1 package DX::Op::ApplyConstraint;
7 has vars => (is => 'ro', required => 1);
8 has constraint => (is => 'ro', required => 1);
11 my ($self, $state) = @_;
12 my @vars = map $state->scope_var($_)->bound_value, @{$self->vars};
13 if ($self->constraint->(@vars)) {
14 return $state->then($self->next);
16 return $state->backtrack;