From: Matt S Trout Date: Fri, 14 Feb 2014 07:28:08 +0000 (+0000) Subject: predicate op forgot to expand constants X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ff19cedbe293a97055c894e6ff5f8d29499e1ea0;p=scpubgit%2FDKit.git predicate op forgot to expand constants --- diff --git a/lib/DX/Op/Predicate.pm b/lib/DX/Op/Predicate.pm index 80a42b6..841e6fc 100644 --- a/lib/DX/Op/Predicate.pm +++ b/lib/DX/Op/Predicate.pm @@ -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 %_;