[Catalyst] Handling configuration outside the Catalyst application

Daniel Austin daniel.austin at gmail.com
Fri Aug 28 02:10:11 GMT 2009


Hello

How are you handling configuration for applications or code that run
outside of Catalyst?

For example, in my model tests, I have code like this:

    use MyCompany::CatApp;
    my $app = MyCompany::CatApp->new();
    my $model = $app->model('DB::Model')->new({});
    ok( $model->insert );

etc.

This way the model tests are talking to the right database as
configured for that environment. But it seems slow to run and it's not
the right coupling if I have, say, a cronjob that wants to use the
same models.

Are there any patterns anyone can recommend?

Dan



More information about the Catalyst mailing list