Fixed infinte loop if SQLite connect_info has only a DSN (RT #47101)
Dan Dascalescu [Thu, 18 Jun 2009 07:17:09 +0000 (07:17 +0000)]
Changes
TODO
lib/Catalyst/Helper/Model/DBIC/Schema.pm

diff --git a/Changes b/Changes
index a3f2192..bf937f4 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,7 @@
 Revision history for Perl extension Catalyst::Model::DBIC::Schema
 
+        - Fixed infinte loop if SQLite connect_info has only a DSN (dandv, RT #47101)
+
 0.24  Tue Jun 16 06:18:58 PDT 2009
         - Add tests for issues with Class::C3 which are caused to
           applications which use new Catalyst but old DBIC, and have
@@ -9,11 +11,11 @@ Revision history for Perl extension Catalyst::Model::DBIC::Schema
         - helper passes loader opts to dynamic schemas
         - conversion to Moose
         - cursor caching support (via
-         Catalyst::TraitFor::Model::DBIC::Schema::Caching)
-       - ::Storage::Replicated support (via ::Replicated trait)
+          Catalyst::TraitFor::Model::DBIC::Schema::Caching)
+        - ::Storage::Replicated support (via ::Replicated trait)
         - switch to hashref connect_info for DBIC 8100
         - better helper option parsing, with support for more options
-       - more tests
+        - more tests
 
 0.23  Sun Mar  8 20:30:02 GMT 2009
         - Kill a couple of warnings (one due to MRO::Compat)
diff --git a/TODO b/TODO
index 66e4cc8..a1f2aa0 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1 +1,3 @@
 timezone and locale support for dates at helper time
+
+see why warnings get silenced (https://rt.cpan.org/Ticket/Display.html?id=47101)
index 049ff7e..1b7f591 100644 (file)
@@ -400,7 +400,7 @@ sub _get_dsn_user_pass {
 
     if ($dsn =~ /sqlite/i) {
         ($user, $password) = ('', '');
-        shift @$connect_info while $connect_info->[0] eq '';
+        shift @$connect_info while @$connect_info and $connect_info->[0] eq '';
     } else {
         ($user, $password) = splice @$connect_info, 0, 2;
     }