[Bast-commits] r7661 - in SQL-Abstract/1.x/trunk: . lib/SQL t
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Tue Sep 15 04:54:37 GMT 2009
Author: ribasushi
Date: 2009-09-15 04:54:36 +0000 (Tue, 15 Sep 2009)
New Revision: 7661
Modified:
SQL-Abstract/1.x/trunk/Changes
SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm
SQL-Abstract/1.x/trunk/t/02where.t
Log:
Fix some warnings
Modified: SQL-Abstract/1.x/trunk/Changes
===================================================================
--- SQL-Abstract/1.x/trunk/Changes 2009-09-14 21:19:00 UTC (rev 7660)
+++ SQL-Abstract/1.x/trunk/Changes 2009-09-15 04:54:36 UTC (rev 7661)
@@ -1,5 +1,7 @@
Revision history for SQL::Abstract
+ - Fixed a couple of untrapped undefined warnings
+
revision 1.58 2009-09-04 15:20 (UTC)
----------------------------
- expanded the scope of -bool and -not_bool operators
Modified: SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm
===================================================================
--- SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm 2009-09-14 21:19:00 UTC (rev 7660)
+++ SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm 2009-09-15 04:54:36 UTC (rev 7661)
@@ -708,11 +708,14 @@
my @vals = @$vals; #always work on a copy
if(@vals) {
- $self->_debug("ARRAY($vals) means multiple elements: [ @vals ]");
+ $self->_debug(sprintf '%s means multiple elements: [ %s ]',
+ $vals,
+ join (', ', map { defined $_ ? "'$_'" : 'NULL' } @vals ),
+ );
# see if the first element is an -and/-or op
my $logic;
- if ($vals[0] =~ /^ - ( AND|OR ) $/ix) {
+ if (defined $vals[0] && $vals[0] =~ /^ - ( AND|OR ) $/ix) {
$logic = uc $1;
shift @vals;
}
Modified: SQL-Abstract/1.x/trunk/t/02where.t
===================================================================
--- SQL-Abstract/1.x/trunk/t/02where.t 2009-09-14 21:19:00 UTC (rev 7660)
+++ SQL-Abstract/1.x/trunk/t/02where.t 2009-09-15 04:54:36 UTC (rev 7661)
@@ -117,6 +117,14 @@
{
where => {
+ requestor => { '!=', ['-and', undef, ''] },
+ },
+ stmt => " WHERE ( requestor IS NOT NULL AND requestor != ? )",
+ bind => [''],
+ },
+
+ {
+ where => {
priority => [ {'>', 3}, {'<', 1} ],
requestor => { '!=', undef },
},
More information about the Bast-commits
mailing list