[Catalyst] Include a local configuration file

Octavian Râşniţă orasnita at gmail.com
Sun Nov 8 15:41:20 GMT 2009


Hello,

I want to include a configuration file (for generating a menu) in a separate 
file, not in myapp.pl nor myapp_local.pl.

That file (menu.pl) also contains a perl hashref inside.

I have included this file using the following line in myapp.pl and it works 
under Windows:

menu => do('menu.pl'),

but it doesn't work under Linux.

Under Linux I have tried:

menu => do("__path_to(menu.pl)__"),

but it doesn't want to work this way.

It does want to work if I use:

menu => do('/srv/MyApp/menu.pl'),

and I can put this configuration in myapp_local.pl, but... is there a way of 
specifying the path to the home directory in order to not need using 
myapp_local.pl?

Thank you.

Octavian




More information about the Catalyst mailing list