[Catalyst] Access config values

Dermot paikkos at googlemail.com
Thu Jan 29 12:18:06 GMT 2009


Rats, Sorry I have read a thread on this in the past but I can't find it.

I want to set the dsn vaules in my app conf (config general) alone.
The values are

<MyApp::DB>
        connect_info dbi:SQLite:/var/db/myapp/myapp.db
        connect_info dummy username
</MyApp::DB>


How can I get these to values in my Schema config, which currently
looks like this.

use base 'Catalyst::Model::DBIC::Schema';

__PACKAGE__->config(
    schema_class => 'MyApp::Schema',
    connect_info => [
        'dbi:SQLite:/var/db/myapp/myapp.db',

    ],
);

Is there a way to pass config->connect_info those values from my conf.
TIA,
Dp.



More information about the Catalyst mailing list