From: Matt S Trout Date: Mon, 18 Mar 2019 04:34:37 +0000 (+0000) Subject: move -not to an expander X-Git-Tag: v1.90_01~370 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=30df414aba665f75a12eb0ff4231aabec029668a;p=dbsrgits%2FSQL-Abstract.git move -not to an expander --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index c140100..1a8705d 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -194,6 +194,7 @@ sub new { $opt{expand} = { -ident => '_expand_ident', -value => sub { +{ -bind => [ our $Cur_Col_Meta, $_[2] ] } }, + -not => sub { +{ -op => [ 'not', $_[0]->_expand_expr($_[2]) ] } }, }; return bless \%opt, $class; @@ -634,9 +635,6 @@ sub _expand_expr_hashpair { puke "-bool => undef not supported" unless defined($v); return $self->_expand_ident(-ident => $v); } - if ($k eq '-not') { - return { -op => [ 'not', $self->_expand_expr($v) ] }; - } if (my ($rest) = $k =~/^-not[_ ](.*)$/) { return +{ -op => [ 'not',