[Catalyst] Patch to make ConfigLoader load "local" files
John Tate
jt6 at sanger.ac.uk
Tue Nov 20 13:24:59 GMT 2007
Hi,
I've been trying to get C::P::ConfigLoader (0.18) to load "local"
configuration files. From my reading of the documentation, if have a
Config::General configuration file called "myapp.conf", I should be able
to load another file named something like "myapp_local.conf", but I've
not been able to make it work. I can't find any other reports of this
problem, so I'm probably misreading the documentation or misusing the
plugin...
However, from looking at the code and after adding my own debug calls to
C::P::ConfigLoader, I think there might be a problem with the find_files
method. When building the list of config files to load, it returns
something like "myapp.conf_local" rather than "myapp_local.conf". That
file will never get loaded into the configuration because it doesn't
have the right file type to be picked up by Config::Any. Attached is a
trivial patch that changes the way the method builds the filename, which
makes "myapp_local.conf" get loaded as I'd expect.
John.
--
The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.
More information about the Catalyst
mailing list