[Catalyst] Working with project configurationfileoutsideofCatalystdirectory

Octavian Rasnita orasnita at gmail.com
Sun Sep 5 19:18:10 GMT 2010


Please tell us if it works, because I haven't tried it.

Octavian

----- Original Message ----- 
From: "Leandro Hermida" <softdev at leandrohermida.com>
To: "The elegant MVC web framework" <catalyst at lists.scsys.co.uk>
Sent: Sunday, September 05, 2010 7:53 PM
Subject: Re: [Catalyst] Working with project configurationfileoutsideofCatalystdirectory


Hi Octavian,

That makes a lot of sense thank you, I had mistakenly thought that you
had to include an entire Config::General block if you wanted to
include it in something else.  Will try that

best,
Leandro

On Sun, Sep 5, 2010 at 8:58 AM, Octavian Rasnita <orasnita at gmail.com> wrote:
> Hi Leandro,
>
> Have you tried to use in your main configuration file something like:
>
> <MyDB>
> <<include db.conf>>
> </MyDB>
>
> and in your Catalyst configuration file something like:
>
> <Model::DB>
> <<include db.conf>>
> </Model::DB>
>
> and in the db.conf:
>
> schema_class ...
> <connect_info>
> dsn ...
> username ...
> password ...
> AutoCommit 1
> </connect_info>
>
> Octavian
>
> ----- Original Message -----
> From: "Leandro Hermida" <softdev at leandrohermida.com>
> To: "The elegant MVC web framework" <catalyst at lists.scsys.co.uk>
> Sent: Sunday, September 05, 2010 2:14 AM
> Subject: Re: [Catalyst] Working with project configurationfileoutsideofCatalyst directory
>
>
>> Hi there,
>>
>> But none of these solutions solve the problem I mentioned in my
>> earlier email. If for example you have your database connection
>> information in the parent project configuration file which would be
>> common since many things outside of Catalyst need to access the
>> database and in this file you would have it look like this:
>>
>> <MyDB>
>> schema_class ...
>> <connect_info>
>> dsn ...
>> username ...
>> password ...
>> AutoCommit 1
>> </connect_info>
>> </MyDB>
>>
>> And in the Catalyst configuration file if you include the parent
>> config it won't work since Catalyst::Model::DBIC::Schema seems to need
>> the enclosing tags to start with Model:: i.e. <Model::MyDB>
>> </Model::MyDB>. Of course it doesn't make sense to use such tags in
>> the parent configuration.
>>
>> Does anyone know of a way to have Catalyst::Model::DBIC::Schema look
>> for a different set of tags in the Config::General file?
>>
>> best,
>> Leandro
>>
>> _______________________________________________
>> List: Catalyst at lists.scsys.co.uk
>> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
>> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
>> Dev site: http://dev.catalyst.perl.org/
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>

_______________________________________________
List: Catalyst at lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/



More information about the Catalyst mailing list