From: Matt S Trout Date: Sat, 28 Sep 2019 16:39:57 +0000 (+0000) Subject: call op expanders for unop hashpairs, move ident and value to op-only expand X-Git-Tag: v2.000000~3^2~104 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=66020c8e22f8a34153740860d6da47416a89f523;p=dbsrgits%2FSQL-Abstract.git call op expanders for unop hashpairs, move ident and value to op-only expand --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index 417c0f0..ec08762 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -152,8 +152,6 @@ our %Defaults = ( not_between => '_expand_between', op => '_expand_op', (map +($_ => '_expand_op_is'), ('is', 'is_not')), - ident => '_expand_ident', - value => '_expand_value', func => '_expand_func', values => '_expand_values', }, @@ -673,8 +671,8 @@ sub _expand_select_clause_where { }; }; $self->clone - ->wrap_expanders(map +($_ => $_wrap), qw(ident value bind)) - ->wrap_op_expanders(map +($_ => $_wrap), qw(ident value bind)) + ->wrap_expander(bind => $_wrap) + ->wrap_op_expanders(map +($_ => $_wrap), qw(ident value)) ->wrap_expander(func => sub { my $orig = shift; sub { @@ -1020,7 +1018,7 @@ sub _expand_hashpair_op { } } - if (my $exp = $self->{expand}{$op}) { + if (my $exp = $self->{expand}{$op}||$self->{expand_op}{$op}) { return $self->$exp($op, $v); }