X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDX%2FSearchState.pm;h=9562373ab553da5b6c63d122d3335230c7677e5c;hb=5d243619c312a8ba979c1f05499a1842e5f65895;hp=005aa3cb99cf87c8ea84e832b2ede4abea0f47d0;hpb=96e5344d59892e81cf43281631b38265fe7d8a50;p=scpubgit%2FDX.git diff --git a/lib/DX/SearchState.pm b/lib/DX/SearchState.pm index 005aa3c..9562373 100644 --- a/lib/DX/SearchState.pm +++ b/lib/DX/SearchState.pm @@ -36,20 +36,8 @@ sub with_one_step { my ($self) = @_; my $hyp = $self->current_hypothesis; return undef unless my $step = $self->next_step; - my ($new_ss, $alt_step) = $step->apply_to($self); - if ($new_ss) { - return $new_ss->but( - alternatives => [ - ($alt_step - ? [ $hyp, $alt_step ] - : ()), - @{$new_ss->alternatives} - ], - ); - } - if ($alt_step) { - return $self->but(next_step => $alt_step); - } + my ($new_ss) = $step->apply_to($self); + return $new_ss if $new_ss; my ($first_alt, @rest_alt) = @{$self->alternatives}; return undef unless $first_alt; trace 'search.backtrack.rewind_to' => $first_alt->[1];