[Catalyst-commits] r10941 - in trunk/Catalyst-Model-DBIC-Schema: .
lib/Catalyst/Model/DBIC t
bluefeet at dev.catalyst.perl.org
bluefeet at dev.catalyst.perl.org
Wed Jul 22 16:16:42 GMT 2009
Author: bluefeet
Date: 2009-07-22 16:16:42 +0000 (Wed, 22 Jul 2009)
New Revision: 10941
Modified:
trunk/Catalyst-Model-DBIC-Schema/Changes
trunk/Catalyst-Model-DBIC-Schema/lib/Catalyst/Model/DBIC/Schema.pm
trunk/Catalyst-Model-DBIC-Schema/t/07connect_info.t
Log:
fix loading connect_info from schema-defined connection (RT 48084)
Modified: trunk/Catalyst-Model-DBIC-Schema/Changes
===================================================================
--- trunk/Catalyst-Model-DBIC-Schema/Changes 2009-07-22 12:46:29 UTC (rev 10940)
+++ trunk/Catalyst-Model-DBIC-Schema/Changes 2009-07-22 16:16:42 UTC (rev 10941)
@@ -1,6 +1,7 @@
Revision history for Perl extension Catalyst::Model::DBIC::Schema
0.26 As yet unreleased
+ - fix loading connect_info from schema-defined connection (RT 48084)
- Fix missing dep on Catalyst::Helper that made tests fail (RT 47449)
0.25 Fri Jun 19 08:35:38 PDT 2009
Modified: trunk/Catalyst-Model-DBIC-Schema/lib/Catalyst/Model/DBIC/Schema.pm
===================================================================
--- trunk/Catalyst-Model-DBIC-Schema/lib/Catalyst/Model/DBIC/Schema.pm 2009-07-22 12:46:29 UTC (rev 10940)
+++ trunk/Catalyst-Model-DBIC-Schema/lib/Catalyst/Model/DBIC/Schema.pm 2009-07-22 16:16:42 UTC (rev 10941)
@@ -442,7 +442,7 @@
has storage_type => (is => 'rw', isa => Str);
-has connect_info => (is => 'ro', isa => ConnectInfo, coerce => 1);
+has connect_info => (is => 'rw', isa => ConnectInfo, coerce => 1);
has model_name => (
is => 'ro',
Modified: trunk/Catalyst-Model-DBIC-Schema/t/07connect_info.t
===================================================================
--- trunk/Catalyst-Model-DBIC-Schema/t/07connect_info.t 2009-07-22 12:46:29 UTC (rev 10940)
+++ trunk/Catalyst-Model-DBIC-Schema/t/07connect_info.t 2009-07-22 16:16:42 UTC (rev 10941)
@@ -47,7 +47,7 @@
{ pg_enable_utf8 => 1 }, { AutoCommit => 1 }, { auto_savepoint => 1 }],
);
-plan tests => @tests / 2 + @invalid + 1;
+plan tests => @tests / 2 + @invalid + 1 + 1;
# ignore redefined warnings, and uninitialized warnings from old
# ::Storage::DBI::Replicated
@@ -88,6 +88,14 @@
map $tests[$_], grep $_ % 2, 0 .. $#tests
], 'replicant connect_infos coerced correctly';
+{
+ ASchemaClass->connection( @{$tests[0]} );
+ my $m = instance();
+
+ is_deeply $m->connect_info, $tests[1],
+ 'connect_info coerced correctly when defining connection in the schema class';
+}
+
sub instance {
Catalyst::Model::DBIC::Schema->new({
schema_class => 'ASchemaClass',
More information about the Catalyst-commits
mailing list