(map +($_ => '_expand_op_is'), ('is', 'is_not')),
ident => '_expand_ident',
value => '_expand_value',
+ func => '_expand_func',
};
$opt{expand_op} = {
return +{ -op => [ $func, $self->_expand_expr($v) ] };
}
}
- return +{ -func => [ $func, $self->_expand_expr($v) ] };
+ return +{ -func => [
+ $func,
+ map $self->_expand_expr($_),
+ ref($v) eq 'ARRAY' ? @$v : $v
+ ] };
}
# scalars and literals get simply expanded
puke(sprintf $fail, $op);
}
+sub _expand_func {
+ my ($self, undef, $args) = @_;
+ my ($func, @args) = @$args;
+ return { -func => [ $func, map $self->expand_expr($_), @args ] };
+}
+
sub _expand_ident {
my ($self, undef, $body, $k) = @_;
return $self->_expand_hashpair_cmp(