From: Dan Dascalescu Date: Thu, 18 Jun 2009 07:17:09 +0000 (+0000) Subject: Fixed infinte loop if SQLite connect_info has only a DSN (RT #47101) X-Git-Tag: v0.26~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=108a45d1c8ce95174c076aeada02e2073dc9e167;hp=7314403accaf92512542e7ec3181282b60af3316;p=catagits%2FCatalyst-Model-DBIC-Schema.git Fixed infinte loop if SQLite connect_info has only a DSN (RT #47101) --- diff --git a/Changes b/Changes index a3f2192..bf937f4 100644 --- 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 --- 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) diff --git a/lib/Catalyst/Helper/Model/DBIC/Schema.pm b/lib/Catalyst/Helper/Model/DBIC/Schema.pm index 049ff7e..1b7f591 100644 --- a/lib/Catalyst/Helper/Model/DBIC/Schema.pm +++ b/lib/Catalyst/Helper/Model/DBIC/Schema.pm @@ -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; }