On Tue, Oct 27, 2009 at 8:17 AM, Evan Carroll <[email protected]> wrote:

> I want to dynamically modify the configuration of my application for
> the purpose of testing. That configuration is loaded from a yaml. I'm
> unsure of how to to load a different yaml-conf for the purpose of
> testing alternate configurations, or of how to best manipulate the
> configuration of my app after the load to simulate a test in a
> different environments then the default.
>
>
http://search.cpan.org/~bricas/Catalyst-Plugin-ConfigLoader-0.27/lib/Catalyst/Plugin/ConfigLoader.pm

get_config_local_suffix<http://search.cpan.org/%7Ebricas/Catalyst-Plugin-ConfigLoader-0.27/lib/Catalyst/Plugin/ConfigLoader.pm#___top>

Determines the suffix of files used to override the main config. By default
this value is local, which will load myapp_local.conf. The suffix can be
specified in the following order of preference:

   - $ENV{ MYAPP_CONFIG_LOCAL_SUFFIX }
   - $ENV{ CATALYST_CONFIG_LOCAL_SUFFIX }
   - $c->config->{ 'Plugin::ConfigLoader' }->{ config_local_suffix }

The first one of these values found replaces the default of local in the
name of the local config file to be loaded.

For example, if $ENV{ MYAPP_CONFIG_LOCAL_SUFFIX } is set to testing,
ConfigLoader will try and load myapp_testing.conf instead of
myapp_local.conf.
cheers,

J


-- 
Jason Galea
Web Developer

Ph 07 40556926
Mob 04 12345 534
www.eightdegrees.com.au
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to