Skip Menu |

This queue is for tickets about the Class-DBI-SQLite CPAN distribution.

Report information
The Basics
Id: 13526
Status: resolved
Priority: 0/
Queue: Class-DBI-SQLite

People
Owner: Nobody in particular
Requestors: william [...] knowmad.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.09
Fixed in: (no value)



Subject: Uninitialized value warnings
CDBI::SQLite is warning about unitialized values when performing a split operation at line 45. This warning seems innocuous. I have attached a patch which avoids setting the @pks array if no primary key is found. The patch passes all tests and works fine under my environment. Thanks, William
--- lib/Class/DBI/SQLite.pm.orig 2005-07-04 14:51:26.000000000 -0400 +++ lib/Class/DBI/SQLite.pm 2005-07-04 14:50:51.000000000 -0400 @@ -42,7 +42,7 @@ @pks = ($primary); } else { my ($pks)= $sql =~ m/PRIMARY\s+KEY\s*\(\s*([^)]+)\s*\)/; - @pks = split m/\s*\,\s*/, $pks; + @pks = split(m/\s*\,\s*/, $pks) if $pks; } $class->table($table); $class->columns(Primary => @pks);