Skip Menu |

This queue is for tickets about the Catalyst-Plugin-ConfigLoader CPAN distribution.

Report information
The Basics
Id: 47937
Status: resolved
Priority: 0/
Queue: Catalyst-Plugin-ConfigLoader

People
Owner: Nobody in particular
Requestors: ddascalescu+perl [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.24
Fixed in: (no value)



Subject: MYAPP_CONFIG_LOCAL_SUFFIX is ignored with Catalyst::Test
Reproduced with Strawberry Perl 5.10 on Windows and Perl 5.8.8 on Ubuntu. use strict; use warnings; use Test::More tests => 3; BEGIN { $ENV{BOOKS_CONFIG_LOCAL_SUFFIX} = 'test'; use_ok 'Catalyst::Test', 'Books'; # ok } ok my ($res, $c) = ctx_request('/'), 'context object'; # ok is $c->get_config_local_suffix, 'test'; # fails - the suffix is still 'local'
$appname is generated and then ignored in get_config_local_suffix. Attached is a patch to use it, which seems to fix this bug. Elsewhere, get_config_path also fails to use $appname when calling Catalyst::Utils::env_value. That may also be incorrect, I'm not sure.
--- ConfigLoader.pm~ 2009-01-05 10:27:06.000000000 -0800 +++ ConfigLoader.pm 2009-07-16 02:10:37.000000000 -0700 @@ -212,7 +212,7 @@ my $c = shift; my $appname = ref $c || $c; - my $suffix = Catalyst::Utils::env_value( $c, 'CONFIG_LOCAL_SUFFIX' ) + my $suffix = Catalyst::Utils::env_value( $appname, 'CONFIG_LOCAL_SUFFIX' ) || $c->config->{ 'Plugin::ConfigLoader' }->{ config_local_suffix } || 'local';
From: ddascalescu+perl [...] gmail.com
On Thu Jul 16 05:16:42 2009, prestemon wrote: Show quoted text
> $appname is generated and then ignored in get_config_local_suffix. > Attached is a patch to use it, which seems to fix this bug.
Any updates? Would be great to have this patch pushed to CPAN.
Version 0.25 released to CPAN.