From: Matt S Trout Date: Thu, 18 Apr 2019 00:39:14 +0000 (+0000) Subject: eliminate vestigial length checks X-Git-Tag: v2.000000~3^2~213 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d406f2796b6979be361cf5ee1eb73a2b59dd3ea7;p=dbsrgits%2FSQL-Abstract.git eliminate vestigial length checks --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index 3a21089..0c0cbbb 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -1185,7 +1185,7 @@ sub _render_op_in { sub _render_op_andor { my ($self, $op, $args) = @_; - my @parts = grep length($_->[0]), map [ $self->render_aqt($_) ], @$args; + my @parts = map [ $self->render_aqt($_) ], @$args; return '' unless @parts; return @{$parts[0]} if @parts == 1; my ($sql, @bind) = $self->join_clauses(' '.$self->_sqlcase($op).' ', @parts); @@ -1194,7 +1194,7 @@ sub _render_op_andor { sub _render_op_multop { my ($self, $op, $args) = @_; - my @parts = grep length($_->[0]), map [ $self->render_aqt($_) ], @$args; + my @parts = map [ $self->render_aqt($_) ], @$args; return '' unless @parts; return @{$parts[0]} if @parts == 1; my $join = ($op eq ','