From: Matt S Trout Date: Mon, 1 Apr 2019 03:16:14 +0000 (+0000) Subject: kill ident/value specialness X-Git-Tag: v2.000000~3^2~297 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eb210500f504d41a96a1e368d34c384efd2871f6;p=dbsrgits%2FSQL-Abstract.git kill ident/value specialness --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index 65f6c8f..f55fe44 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}||{}}