From: Matt S Trout Date: Thu, 18 Apr 2019 00:39:14 +0000 (+0000) Subject: eliminate vestigial length checks X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bdcc1903388a8fec4a507a8fa35ef60ff96693a1;p=scpubgit%2FQ-Branch.git eliminate vestigial length checks --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index 6ee5a5f..49e0da6 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 ','