[Catalyst] Merging configs

Brian Cassidy brian.cassidy at nald.ca
Fri Mar 9 15:16:00 GMT 2007


Bill Moseley wrote:
> On Thu, Mar 08, 2007 at 05:25:55PM -0500, Christopher H. Laco wrote:
>> Catalyst config support a 'local' config file in addition to the regular
>> one. I'm not sure on the exact file name, but I think it's myapp_local.yml
> 
> That's also a shallow merge, IIRC.  It just calls $c->config with the
> local config.

The merge is a little more complicated than you think. It uses 
Catalyst::Utils::merge_hashes underneath

http://dev.catalystframework.org/browser/trunk/Catalyst-Runtime/lib/Catalyst/Utils.pm#L263

for reference, the config() routine:

http://dev.catalystframework.org/browser/trunk/Catalyst-Runtime/lib/Catalyst/Component.pm#L88

-Brian



More information about the Catalyst mailing list