From: Rafael Kitover Date: Thu, 28 Jul 2011 22:28:27 +0000 (-0400) Subject: skip structs in loader args after connect_info X-Git-Tag: v0.52^0 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Model-DBIC-Schema.git;a=commitdiff_plain;h=5a3b72f5cd8196b8b546a9365ce49d98c0dd7f21;hp=f1b4a8fde8a23ab98178c8b78c43eb0c14f52130 skip structs in loader args after connect_info Skips structs when reading extra loader args after the connect_info in the helper. Also a new release, 0.52. --- diff --git a/Changes b/Changes index e0c31d3..64aed1d 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Revision history for Perl extension Catalyst::Model::DBIC::Schema +0.52 Thu Jul 28 22:07:38 UTC 2011 + - fix a bug in loader args reading after connect_info (skip structs) + 0.51 Wed Jul 27 20:57:47 UTC 2011 - warn when helper finds no tables - accept loader args after connect_info diff --git a/lib/Catalyst/Helper/Model/DBIC/Schema.pm b/lib/Catalyst/Helper/Model/DBIC/Schema.pm index 5062ec1..472ef90 100644 --- a/lib/Catalyst/Helper/Model/DBIC/Schema.pm +++ b/lib/Catalyst/Helper/Model/DBIC/Schema.pm @@ -4,7 +4,7 @@ use namespace::autoclean; use Moose; no warnings 'uninitialized'; -our $VERSION = '0.51'; +our $VERSION = '0.52'; $VERSION = eval $VERSION; use Carp; @@ -312,6 +312,10 @@ sub _read_loader_args { } while (defined $args->[$i]) { + $i++ while $self->_is_struct($args->[$i]); + + last if not defined $args->[$i]; + my ($key, $val) = split /=/, $args->[$i++], 2; if ($self->_is_struct($val)) { diff --git a/lib/Catalyst/Model/DBIC/Schema.pm b/lib/Catalyst/Model/DBIC/Schema.pm index 12a3185..526d938 100644 --- a/lib/Catalyst/Model/DBIC/Schema.pm +++ b/lib/Catalyst/Model/DBIC/Schema.pm @@ -5,7 +5,7 @@ use mro 'c3'; extends 'Catalyst::Model'; with 'CatalystX::Component::Traits'; -our $VERSION = '0.51'; +our $VERSION = '0.52'; $VERSION = eval $VERSION; use namespace::autoclean;