switch next predicate to mutating searchstate instead of using alt_step
[scpubgit/DX.git] / lib / DX / Step / InvokeNextPredicate.pm
CommitLineData
e647e417 1package DX::Step::InvokeNextPredicate;
2
3use DX::Class;
4
5with 'DX::Role::Step';
6
ccf0d4fe 7has proposition => (is => 'ro', required => 1);
8
e647e417 9sub apply_to {
110fd002 10 my ($self, $ss) = @_;
11 my $hyp = $ss->current_hypothesis;
c75a6803 12 if (my $step = $self->proposition->resolve_for($hyp->scope)) {
13 return $ss->but(next_step => $step);
14 }
15 return undef;
e647e417 16}
17
181;