[Catalyst] Configuration process

Frederic Demians frederic at demians.fr
Wed Jul 1 17:30:36 GMT 2009


Hello,

It must be a newbie question...

I have a simple application, let say MyApp. In lib/MyApp.pm, I ask for 
standard config loading with:

  Catalyst qw/  ConfigLoader /

I want to add config variables from another source than myapp.conf. But 
in order to construct those variables I need to access configuration 
variables loaded by ConfigLoader. But those variables are not yet loaded 
when I access them:

myapp.conf contains:

   filepath /path/to/config.xml

And in MyApp.pm, I have:

__PACKAGE__->config(
     speciolconf => XMLin( __PACKAGE->config->{filepath}
);

This issue is that __PACKAGE->config->{filepath} is not initialized.

How can I do?

Thanks.
--
Frédéric



More information about the Catalyst mailing list