my ($op) = $name =~ /^-(.*)$/;
$opt{expand_op}{$op} = sub {
my ($self, $op, $arg, $k) = @_;
- return $self->_expand_expr_hashtriple(
- $k, $self->{cmp}, { "-${op}" => $arg }
+ return $self->_expand_expr_hashpair_cmp(
+ $k, { "-${op}" => $arg }
);
};
}
and not defined $v->{-value}
)
) {
- return $self->_expand_expr_hashtriple($k => $self->{cmp} => undef);
+ return $self->_expand_expr_hashpair_cmp($k => undef);
}
# scalars and objects get expanded as whatever requested or values
die "notreached";
}
+sub _expand_expr_hashpair_cmp {
+ my ($self, $k, $v) = @_;
+ $self->_expand_expr_hashtriple($k, $self->{cmp}, $v);
+}
+
sub _expand_expr_hashtriple {
my ($self, $k, $vk, $vv) = @_;