From: Matt S Trout Date: Sun, 17 Jul 2016 18:44:02 +0000 (+0000) Subject: switch recheck to using an on_completion_step X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=91543b6231e8bf4af4ce781efa2056b299a843e9;p=scpubgit%2FDX.git switch recheck to using an on_completion_step --- diff --git a/lib/DX/Step/CompleteRecheck.pm b/lib/DX/Step/CompleteRecheck.pm index 35b805b..a00c796 100644 --- a/lib/DX/Step/CompleteRecheck.pm +++ b/lib/DX/Step/CompleteRecheck.pm @@ -27,7 +27,6 @@ sub apply_to { current_hypothesis => $re_hyp->but( resolved_propositions => $rps ), - is_solution_state => 1 ); } diff --git a/lib/DX/Step/EnterRecheck.pm b/lib/DX/Step/EnterRecheck.pm index c7dc447..3f5c643 100644 --- a/lib/DX/Step/EnterRecheck.pm +++ b/lib/DX/Step/EnterRecheck.pm @@ -8,6 +8,8 @@ with 'DX::Role::Step'; has proposition_list => (is => 'ro', required => 1); +has on_completion_step => (is => 'ro', required => 1); + sub apply_to { my ($self, $old_ss) = @_; @@ -52,7 +54,9 @@ sub apply_to { is_solution_state => 0, on_exhaustion_step => undef, on_solution_step => DX::Step::CompleteRecheck->new( - resume_search_state => $old_ss, + resume_search_state => $old_ss->but( + next_step => $self->on_completion_step + ), was_recheck_for => $prop, ), ); diff --git a/lib/DX/Step/ResolveProposition.pm b/lib/DX/Step/ResolveProposition.pm index 0cd04f1..ee5ff14 100644 --- a/lib/DX/Step/ResolveProposition.pm +++ b/lib/DX/Step/ResolveProposition.pm @@ -87,6 +87,7 @@ sub _recheck_one { my $ss = $old_ss->but( next_step => DX::Step::EnterRecheck->new( proposition_list => [ $prop ], + on_completion_step => DX::Step::MarkAsSolution->new, ), );