predicate op forgot to expand constants
[scpubgit/DKit.git] / lib / DX / Op / Predicate.pm
index 80a42b6..841e6fc 100644 (file)
@@ -12,6 +12,9 @@ sub run {
   my ($self, $state) = @_;
   my @args = @{$self->args};
   my @arg_names = @{$self->arg_names};
+  my %new; @new{@arg_names} = @args;
+  ($state, my %expanded) = $state->expand_vars(%new);
+  @args = @expanded{@arg_names};
   my @cases = @{$self->arg_cases};
   CASE: while (my ($req, $code) = splice @cases, 0, 2) {
     local %_;