From: Matt S Trout Date: Mon, 17 Sep 2018 00:09:00 +0000 (+0000) Subject: { x => { -and => [ ... ] } converted to op X-Git-Tag: v2.000000~3^2~472 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fee28f13a45aa4c3e558481cc80dafe567ab5743;p=dbsrgits%2FSQL-Abstract.git { x => { -and => [ ... ] } converted to op --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index 3341a95..bd04ae1 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -813,7 +813,8 @@ sub _expand_expr_hashpair { : $op =~ $self->{not_like_op} ? belch("Supplying an empty arrayref to '@{[ uc $op]}' is deprecated") && $self->{sqltrue} : puke "operator '$op' applied on an empty array (field '$k')"; } - return +{ $logic => [ + return +{ -op => [ + $logic =~ /^-(.*)$/, map $self->_expand_expr_hashpair($k => { $vk => $_ }), @values ] };