[Catalyst] Handling configuration outside the Catalyst application

Daniel Austin daniel.austin at gmail.com
Sun Aug 30 04:10:14 GMT 2009


2009/8/28 Eden Cardim <edencardim at gmail.com>:
> > [...]
> Catalyst::Model::DBIC::Schema is just an adaptor for loading a
> DBIC::Schema inside a catalyst application. You can "use
> MyApp::Schema::DB" anywhere outside your catalyst application, [...]

Initially I was doing exactly that for my model tests. But then I
found myself hacking in a partial implementation of Catalysts
ConfigLoader so that the model tests would talk to the correct
database depending on whether or not they were running in the "dev",
"test" or "cI" (continuous integration) environments. That seemed
wrong so I switched to loading the full Catalyst app just to get the
correct config (which also seems wrong... :-)  but I digest).

> [...]  my opinion is that
> there should be an external module for use by any application, not
> just cat, and the plugin should just hook that module into Catalyst.

That sounds much cleaner. Sounds like others (Bill, Sebastian)
advocate a similar approach. I'll take a look at Config::JFDI as
suggested by Sebastian in this thread.

Thanks everyone.

Dan



More information about the Catalyst mailing list