From: Matt S Trout Date: Sat, 12 Mar 2016 05:35:08 +0000 (+0000) Subject: clear resume step on first step after forced backtrack X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a1aab147130f91254032d195f308e998e58617d1;p=scpubgit%2FDX.git clear resume step on first step after forced backtrack --- diff --git a/lib/DX/SearchState.pm b/lib/DX/SearchState.pm index f136e33..c1aae18 100644 --- a/lib/DX/SearchState.pm +++ b/lib/DX/SearchState.pm @@ -1,10 +1,11 @@ package DX::SearchState; +use Types::Standard qw(Maybe); use DX::Class; has current_hypothesis => (is => 'ro', isa => Hypothesis, required => 1); -has resume_step => (is => 'ro', isa => Step); +has resume_step => (is => 'ro', isa => Maybe[Step]); has alternatives => (is => 'ro', isa => AlternativeList, required => 1); @@ -33,7 +34,8 @@ sub with_one_step { [ $hyp, $alt_step ], @alt ]) - : ()) + : ()), + resume_step => undef, ); } $step = $alt_step;