From: Matt S Trout Date: Thu, 18 Apr 2019 02:26:29 +0000 (+0000) Subject: compact andor X-Git-Tag: v1.90_01~180 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=31cab4adf649fa5a7363c1e6264992387fae9020;p=dbsrgits%2FSQL-Abstract.git compact andor --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index 91aee75..c8ac6d5 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -1168,14 +1168,11 @@ sub _render_op_in { sub _render_op_andor { my ($self, $op, $args) = @_; - my @parts = map [ $self->render_aqt($_) ], @$args; - return '' unless @parts; - return @{$parts[0]} if @parts == 1; - my ($sql, @bind) = $self->join_query_parts(' ', - '(', [ $self->join_query_parts( - ' '.$self->format_keyword($op).' ', - @parts) ], - ')'); + return '' unless @$args; + return $self->join_query_parts('', $args->[0]) if @$args == 1; + return $self->join_query_parts( + ' ' => '(',[ $self->_render_op_multop($op, $args) ], ')' + ); } sub _render_op_multop {