Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

In my Catalyst test using Catalyst::Test, I need to override a piece of configuration that is stored in the myapp.conf file. How do I do that? How do I get a reference to the usual $c object, for that matter?

Replies are listed 'Best First'.
Re: Catalyst testing
by Your Mother (Archbishop) on Mar 19, 2009 at 16:26 UTC

    Take a peek in Catalyst::Plugin::ConfigLoader for the many places and ways you can influence configuration. Some version of this should do it.

    BEGIN { $ENV{MYAPP_CONFIG_LOCAL_SUFFIX} = "_test"; } # Where myapp_test.yml has the override # setting (plus whatever _local mods you have too), e.g.- --- Model::BLAH: connection_info: - my_override_stuff...
      That was helpful. Thank you, Mother.
Re: Catalyst testing
by Anonymous Monk on Mar 19, 2009 at 15:29 UTC
    edit myapp.conf?