[Catalyst] ConfigLoader trouble

Ben Vinnerd ben-catalyst at vinnerd.com
Wed Jun 17 10:16:39 GMT 2009

On 17/06/09 11:02, Joel Bernstein wrote:
> On 17 Jun 2009, at 10:52, Ben Vinnerd wrote:
>> Have got a problem with ConfigLoader not reading %ENV.
>> At the top of Myapp.pm i have:
>> use parent qw/Catalyst/;
>> use Catalyst qw/StackTrace ConfigLoader/;
>> ...and i'm setting env var in httpd.conf:
>         ^^^ is this intentional? Should be Env?
>> ... but ConfigLoader will not load myapp_beta.conf from the 
>> application dir.
>> I have output the contents of %ENV to my Apache log, and 
>> I'm stumped, as i have this working on another machine.
>> If i manually set ConfigLoader's file option, it loads the config fine:
>> __PACKAGE__->config->{'Plugin::ConfigLoader'} = {file => 
>> '/home/ben/Myapp/myapp_beta.conf'};
>> Any ideas?
> I've not run Catalyst under mod_perl in quite a while, but I would 
> expect PerlSetEnv to definitely DTRT. Are PerlSetVar variables made 
> available in %ENV under C::Engine::Apache? I don't believe so. Does 
> switching to PerlSetEnv fix your issue?
Sorry, typo, yes i'm using PerlSetEnv, *not* PerlSetVar.

I have "PerlOptions +SetupEnv" in my apache config, and like i say i 
output %ENV and it's definately there.

It's like ConfigLoader's setup() isn't being run, or it's choosing to 
ignore the MYAPP_CONFIG_LOCAL_SUFFIX i'm setting.

More information about the Catalyst mailing list