From: Matt S Trout Date: Mon, 17 Sep 2018 00:12:41 +0000 (+0000) Subject: eliminate (I hope) last and/or case in expansion X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cba28f667daf8b24e06821e54f6b30d53aa2136f;p=scpubgit%2FQ-Branch.git eliminate (I hope) last and/or case in expansion --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index b2357dc..22c7616 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -852,7 +852,10 @@ sub _expand_expr_hashpair { ? ($v = [ @{$v}[1..$#$v] ], $1) : ($self->{logic} || 'or') ); - return +{ "-${this_logic}" => [ map $self->_expand_expr({ $k => $_ }, $this_logic), @$v ] }; + return +{ -op => [ + $this_logic, + map $self->_expand_expr({ $k => $_ }, $this_logic), @$v + ] }; } if (my $literal = is_literal_value($v)) { unless (length $k) { @@ -1270,6 +1273,7 @@ sub _where_op_OP { my ($self, undef, $v) = @_; my ($op, @args) = @$v; $op =~ s/^-// if length($op) > 1; + $op = lc($op); local $self->{_nested_func_lhs}; if (my $h = $special{$op}) { return $self->$h(\@args);