There may be other ways, but you could create a separate configuration file 
that contains the database connection settings only and include that 
configuration file in both the master configuration and Catalyst configuration 
files.
If you'll want to change the database connection settings, you will need to 
change it in a single place.

Octavian

----- Original Message ----- 
From: "Leandro Hermida" <soft...@leandrohermida.com>
To: "The elegant MVC web framework" <catalyst@lists.scsys.co.uk>
Sent: Wednesday, September 01, 2010 7:49 PM
Subject: [Catalyst] Working with project configuration file outside ofCatalyst 
directory


> Dear all,
> 
> My apologies if I haven't seen the post with the answer, I've looked
> all over and get explanations for not exactly the same thing. I have a
> big project of which the Catalyst application is only a part.  I want
> a master configuration file for the project which has configuration of
> things independent of Catalyst (e.g. the database connection and
> related info) and of course this configuration file lives outside of
> the Catalyst application directory.  Catalyst will have its
> configuration file in the application directory e.g. my_app.conf and
> this file with have only configuration related to Catalyst and I
> Catalyst to be able to draw from the master project configuration file
> outside to get for example onfiguration for connecting to the database
> because this shouldn't be in my_app.conf.
> 
> Configuration shouldn't be anywhere twice and project code outside the
> Catalyst sub-project shouldn't have any knowledge of Catalyst at all
> and shouldn't go get configuration inside Catalyst, it should be the
> other way around (the only explanations I've seen take the former
> approach).  Is there a way to do this?
> 
> best,
> Leandro
> 
> _______________________________________________
> List: Catalyst@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@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/

Reply via email to