[Catalyst] DBIC::Schema [and schema::loader] from YAML

Brian Cassidy brian.cassidy at nald.ca
Thu Sep 28 17:36:32 CEST 2006


leonard.a.jaffe at jpmchase.com wrote:
> While we're on the subject, lets assume that MySchema is 
> 'myapp::SchemaLoader::foo.
>
> How do I make sure that my SchemaLoader can see the config when it 
> tries to execute
> __PACKAGE__->connection?
>
> It isn't seeing the Model::MyModel connect_info, admonishing me for 
> failing to provide
> connection info.
Are you using Schema::Loader or the vanilla DBIx::Class::Schema? My 
example was strictly for a non-loader setup:

package MyApp::Model;

use base qw( Catalyst::Model::DBIC::Schema );

1;

package MySchema;

use base qw( DBIx::Class::Schema );

__PACKAGE__->load_classes;

1;

--Brian





More information about the Catalyst mailing list