[Bast-commits] r5993 - SQL-Abstract/1.x/trunk/lib/SQL
arcanez at dev.catalyst.perl.org
arcanez at dev.catalyst.perl.org
Tue Apr 28 06:45:31 GMT 2009
Author: arcanez
Date: 2009-04-28 07:45:31 +0100 (Tue, 28 Apr 2009)
New Revision: 5993
Modified:
SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm
Log:
patch to suppress warnings in case first element of the arrayref is undef (NULL)
Modified: SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm
===================================================================
--- SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm 2009-04-28 02:51:30 UTC (rev 5992)
+++ SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm 2009-04-28 06:45:31 UTC (rev 5993)
@@ -505,9 +505,10 @@
$self->_debug("ARRAY($k) means distribute over elements");
# put apart first element if it is an operator (-and, -or)
- my $op = ($v[0] =~ /^ - (?: AND|OR ) $/ix
- ? shift @v
- : ''
+ my $op = (
+ (defined $v[0] && $v[0] =~ /^ - (?: AND|OR ) $/ix)
+ ? shift @v
+ : ''
);
my @distributed = map { {$k => $_} } @v;
More information about the Bast-commits
mailing list