From: Matt S Trout Date: Tue, 26 Mar 2019 03:40:53 +0000 (+0000) Subject: use hashtriple for auto-expand generation X-Git-Tag: v2.000000~3^2~328 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=117898e69a7bba45e07d0639d88307516886a3c6;p=dbsrgits%2FSQL-Abstract.git use hashtriple for auto-expand generation --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index d710f02..6741184 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -212,11 +212,9 @@ sub new { my ($op) = $name =~ /^-(.*)$/; $opt{expand_op}{$op} = sub { my ($self, $op, $arg, $k) = @_; - return +{ -op => [ - $self->{cmp}, - $self->_expand_ident(-ident => $k), - $self->_expand_expr({ '-'.$op => $arg }), - ] }; + return $self->_expand_expr_hashtriple( + $k, $self->{cmp}, { "-${op}" => $arg } + ); }; } }