[Catalyst] Model configuration through .yml
tuco at pasteur.fr
Wed Jan 13 14:17:22 GMT 2010
I'd like to know something, probably a basic problem but just to be sure.
Is it possible to configure Application db connection into .yml
configuration file like :
Actually i tried this way but I cannot connect to the database, neither
start my application, perl is not able to locate my schema class...!!
Here is the error:
Couldn't load class (Schema::MyApp) because: Couldn't instantiate
component "BiblioList::Model::MyAppDB", "Can't locate Schema/MyApp.pm in
I can make it working if I add into Model::MyApp this :
__PACKAGE__->config( ... );
I first did it, just adding 'schema_class' infos and leaving
connect_info into config file and it works like a charm.
However, the strange thing is that, other db connection I configured for
other databases can connect correctly even if I use another Schema
module like Schema::FooBarDB located under the same directory as
For example in another confg file I load using
I can define this
and it connect correctly to my foobardb without throwing errors above.
Is this normal behavior from Catalyst or is there something I am doing
wrong or just a bug?
Thanks for any hint.
More information about the Catalyst