From: Matt S Trout Date: Mon, 1 Apr 2019 03:16:14 +0000 (+0000) Subject: kill ident/value specialness X-Git-Tag: v1.90_01~276 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7e461775f27e8015b6bd29a71f57e39e4bd0a772;p=dbsrgits%2FSQL-Abstract.git kill ident/value specialness --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index c158536..6cb543e 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -217,6 +217,7 @@ sub new { }, (map +($_ => '_expand_op_is'), ('-is', '-is_not')), -ident => '_expand_ident', + -value => '_expand_value', }; $opt{expand_op} = { @@ -228,23 +229,9 @@ sub new { (map +($_ => '_expand_op_andor'), ('and', 'or')), (map +($_ => '_expand_op_is'), ('is', 'is_not')), 'ident' => '_expand_ident', + 'value' => '_expand_value', }; - # placeholder for _expand_unop system - { - my %unops = (-value => '_expand_value'); - foreach my $name (keys %unops) { - $opt{expand}{$name} = $unops{$name}; - my ($op) = $name =~ /^-(.*)$/; - $opt{expand_op}{$op} = sub { - my ($self, $op, $arg, $k) = @_; - return $self->_expand_expr_hashpair_cmp( - $k, { "-${op}" => $arg } - ); - }; - } - } - $opt{render} = { (map +("-$_", "_render_$_"), qw(op func bind ident literal row)), %{$opt{render}||{}}