1 package DX::Role::Predicate;
3 use List::Util qw(reduce);
4 use DX::Utils qw(step);
7 sub resolution_step_for {
8 my ($self, @args) = @_;
9 my ($last, @rest) = reverse $self->_possible_resolution_list(@args);
10 return undef unless $last;
12 $targ = $_->but_with_alternative_step($targ) for @rest;
17 my ($self, $left, $right) = @_;
18 if ($left->equals($right)) {
21 depends_on => [ $left, $right ],
26 if ($left->is_set and my $set = $right->action_for_set_value($left)) {
29 depends_on => [ [ $right => [ $left, $right ] ] ],
36 if ($right->is_set and my $set = $left->action_for_set_value($right)) {
39 depends_on => [ [ $left => [ $left, $right ] ] ],
48 sub selection_depends_on {
49 my ($self, @args) = @_;