Bill Moseley wrote: > My YAML file has sections that are specific to what server > is running. That is, I have: > > # Default config > foo: bar > name: foo > > servers: > > staging: > config: > foo: baz > ... > > devel: > config: > ... > > production: > config: > ... > > So in my setup() I do basically: > > $self->config( $self->config->{servers}{$server_mode}{config} ); > > > Of course, that's a shallow hash merge. > > > Now, my YAML config also configures my View::TT, for example: > > V::TT: > WRAPPER: page/wrapper.tt > PRE_PROCESS: config.tt > TEMPLATE_EXTENSION: .tt > PRE_CHOMP: 0 > POST_CHOMP: 0 > TIMER: 0 > > and I'd like to be able to do something like this: > > > servers: > devel: > config: > V::TT: > DEBUG: provider > BLA: 123 > > but that shallow merge above wipes out the initial V::TT settings. > > Is the answer Hash::Merge? Or does Catalyst have anything to help > here? >
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 -=Chris
signature.asc
Description: OpenPGP digital signature
_______________________________________________ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/