From: Matt S Trout Date: Tue, 26 Mar 2019 00:42:29 +0000 (+0000) Subject: further andor consolidation X-Git-Tag: v2.000000~3^2~345 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f5def2aa230884f9f244faf05bb30e7001c3a91f;p=dbsrgits%2FSQL-Abstract.git further andor consolidation --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index cdc213e..b7dab99 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -645,9 +645,9 @@ sub _expand_expr_hashpair_ident { if (ref($v) eq 'HASH') { if (keys %$v > 1) { return $self->_expand_op_andor(-and => [ - map +{ $k => { $_ => $v->{$_} } }, + map +{ $_ => $v->{$_} }, sort keys %$v - ]); + ], $k); } return undef unless keys %$v; my ($vk, $vv) = %$v; @@ -744,7 +744,7 @@ sub _expand_expr_hashpair_ident { : '-'.lc($self->{logic} || 'OR') ); return $self->_expand_op_andor( - $logic => [ map +{ $k => $_ }, @$v ] + $logic => $v, $k ); } if (my $literal = is_literal_value($v)) {