[Catalyst] Catalyst::Test configuration questions
Jason Galea
lists at eightdegrees.com.au
Mon Oct 26 22:29:58 GMT 2009
On Tue, Oct 27, 2009 at 8:17 AM, Evan Carroll <lists at evancarroll.com> 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/Cataly=
st/Plugin/ConfigLoader.pm
get_config_local_suffix<http://search.cpan.org/%7Ebricas/Catalyst-Plugin-Co=
nfigLoader-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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20091027/b7932=
bb4/attachment.htm
More information about the Catalyst
mailing list