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-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a8e661847de3ebb2a4bd3613b375f6850370d507;p=scpubgit%2FQ-Branch.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 38d24ad..70ff3ea 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); }