Skip Menu |

This queue is for tickets about the Catalyst-Model-DBIC-Schema CPAN distribution.

Report information
The Basics
Id: 47212
Status: resolved
Priority: 0/
Queue: Catalyst-Model-DBIC-Schema

People
Owner: Nobody in particular
Requestors: jasonk [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.25
Fixed in: (no value)



Subject: Can't load schema with pre-defined connect_info...
Catalyst/Model/DBIC/Schema.pm's BUILD method includes this: if( !$self->connect_info ) { if($schema_class->storage && $schema_class->storage->connect_info) { $self->connect_info($schema_class->storage->connect_info); } else { die "Either ->config->{connect_info} must be defined for $class" . " or $schema_class must have connect info defined on it." . " Here's what we got:\n" . Dumper($self); } } Unfortunately, it also includes this: has connect_info => (is => 'ro', isa => ConnectInfo, coerce => 1); So if you actually have this situation, where the connect_info is defined in the schema_class, but not in the model, then you end up with an unloadable model: Couldn't instantiate component "MyApp::Web::Model::DB", "Cannot assign a value to a read-only accessor at /usr/local/lib/perl5/site_perl/5.10.0/Catalyst/Model/DBIC/Schema.pm line 467 -- www.jasonkohles.com
Fixed a while back, thank you for the report.