X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDX%2FRole%2FPredicate.pm;h=1738d8442b16fdd131669d129dbfbad7ddabdd73;hb=113f21b91243fbf16a81c67eb7d447b435455648;hp=28cb8a1afce7643c9f8876bfbad228b8be56ee3f;hpb=1f3fa757641adc0ddd2151f2d8b6f5cdac3dfd77;p=scpubgit%2FDX.git diff --git a/lib/DX/Role/Predicate.pm b/lib/DX/Role/Predicate.pm index 28cb8a1..1738d84 100644 --- a/lib/DX/Role/Predicate.pm +++ b/lib/DX/Role/Predicate.pm @@ -4,6 +4,20 @@ use List::Util qw(reduce); use DX::Utils qw(step CONTENTS_OF); use DX::Role; +sub _possible_resolution_list { + my ($self, @args) = @_; + my $rspace = $self->_resolution_space_for(@args); + my @res; + while (my $next_res = $rspace->next_resolution) { + $rspace = $rspace->remaining_resolution_space; + push @res, step( + actions => $next_res->actions, + depends_on => $next_res->veracity_depends_on, + ); + } + return @res; +} + sub resolution_step_for { my ($self, $prop, @args) = @_; my ($last, @rest) = reverse $self->_possible_resolution_list(@args);