X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDX%2FSearchState.pm;h=18979e72fc8b0a39b7c92f9d33a1f1516e8c6205;hb=c76de01dd23ba8e59821c8587f4e529d31181682;hp=99ac3f23da7b0430f18fb77fc3ac7cbdb5c55fd8;hpb=985b43d17f964ea2fc2c9b7fd043c06a1fe21215;p=scpubgit%2FDX.git diff --git a/lib/DX/SearchState.pm b/lib/DX/SearchState.pm index 99ac3f2..18979e7 100644 --- a/lib/DX/SearchState.pm +++ b/lib/DX/SearchState.pm @@ -35,16 +35,8 @@ sub new_for { sub with_one_step { my ($self) = @_; - my $hyp = $self->current_hypothesis; return undef unless my $step = $self->next_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]; - return $self->but( - next_step => DX::Step::Backtrack->new, - ); + return $step->apply_to($self); } sub force_backtrack {