From: Matt S Trout Date: Sat, 2 Nov 2013 17:44:42 +0000 (+0000) Subject: handle DQ node in IN X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=43da38192fd88dc86f14ff4a5fe2452b93a2e4df;p=dbsrgits%2FSQL-Abstract.git handle DQ node in IN --- diff --git a/lib/SQL/Abstract/Converter.pm b/lib/SQL/Abstract/Converter.pm index 5e6f0cb..e5387ce 100644 --- a/lib/SQL/Abstract/Converter.pm +++ b/lib/SQL/Abstract/Converter.pm @@ -466,10 +466,14 @@ sub _where_hashpair_to_dq { my $x = $$rhs; 1 while ($x =~ s/\A\s*\((.*)\)\s*\Z/$1/s); $rhs = \$x; - } else { - my ($x, @rest) = @{$$rhs}; - 1 while ($x =~ s/\A\s*\((.*)\)\s*\Z/$1/s); - $rhs = \[ $x, @rest ]; + } elsif (ref($rhs) eq 'REF') { + if (ref($$rhs) eq 'ARRAY') { + my ($x, @rest) = @{$$rhs}; + 1 while ($x =~ s/\A\s*\((.*)\)\s*\Z/$1/s); + $rhs = \[ $x, @rest ]; + } elsif (ref($$rhs) eq 'HASH') { + return $self->_op_to_dq($op, $self->_ident_to_dq($k), $$rhs); + } } } return $self->_op_to_dq(