[Catalyst] Configuration based on hostname

Eden Cardim edencardim at gmail.com
Mon Jul 13 11:44:40 GMT 2009

On Sun, Jul 12, 2009 at 4:29 AM, Mihai Bazon<mihai at bazon.net> wrote:
> Let me clarify that.  I don't want to run the app more than once.  I
> just want the application to switch configuration file and database
> depending on the hostname that each particular request targets.

I tend to do:

$c->config->{'Plugin::ConfigLoader'}{config_local_suffix} = hostname();

that way, you can set up your app-wide config in myapp.conf and the
host specific config in myapp_hostname.conf

   Eden Cardim       Need help with your Catalyst or DBIx::Class project?
  Code Monkey                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://edenc.vox.com/            http://www.shadowcat.co.uk/servers/

More information about the Catalyst mailing list