[Catalyst-commits] r6706 - in trunk/Catalyst-Plugin-ConfigLoader: .
lib/Catalyst/Plugin
bricas at dev.catalyst.perl.org
bricas at dev.catalyst.perl.org
Wed Aug 22 03:28:08 GMT 2007
Author: bricas
Date: 2007-08-22 03:28:08 +0100 (Wed, 22 Aug 2007)
New Revision: 6706
Modified:
trunk/Catalyst-Plugin-ConfigLoader/Changes
trunk/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin/ConfigLoader.pm
Log:
fix configloader to use Catalyst::Utils::env_value()
Modified: trunk/Catalyst-Plugin-ConfigLoader/Changes
===================================================================
--- trunk/Catalyst-Plugin-ConfigLoader/Changes 2007-08-21 22:51:37 UTC (rev 6705)
+++ trunk/Catalyst-Plugin-ConfigLoader/Changes 2007-08-22 02:28:08 UTC (rev 6706)
@@ -1,5 +1,11 @@
Revision history for Perl extension Catalyst::Plugin::ConfigLoader.
+0.16 Wed Aug 22 2007
+ [THINGS THAT MAY BREAK YOUR CODE]
+ - use Catalyst::Utils::env_value() to get $ENV values. This means that
+ MYAPP_* is of higher precedence than CATALYST_* -- this differs from
+ the behavior of older releases.
+
0.15 Tue Aug 21 2007
- Allow multiple __HOME__ and __path_to()__ replaces in one string
(Greg Sheard)
Modified: trunk/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin/ConfigLoader.pm
===================================================================
--- trunk/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin/ConfigLoader.pm 2007-08-21 22:51:37 UTC (rev 6705)
+++ trunk/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin/ConfigLoader.pm 2007-08-22 02:28:08 UTC (rev 6706)
@@ -6,8 +6,9 @@
use Config::Any;
use NEXT;
use Data::Visitor::Callback;
+use Catalyst::Utils ();
-our $VERSION = '0.15';
+our $VERSION = '0.16';
=head1 NAME
@@ -130,6 +131,8 @@
=item * C<$ENV{ MYAPP_CONFIG }>
+=item * C<$ENV{ CATALYST_CONFIG }>
+
=item * C<$c-E<gt>config-E<gt>{ file }>
=item * C<$c-E<gt>path_to( $application_prefix )>
@@ -145,7 +148,7 @@
my $c = shift;
my $appname = ref $c || $c;
my $prefix = Catalyst::Utils::appprefix( $appname );
- my $path = $ENV{ Catalyst::Utils::class2env( $appname ) . '_CONFIG' }
+ my $path = Catalyst::Utils::env_value( $c, 'CONFIG' )
|| $c->config->{ file }
|| $c->path_to( $prefix );
@@ -166,10 +169,10 @@
=over 4
+=item * C<$ENV{ MYAPP_CONFIG_LOCAL_SUFFIX }>
+
=item * C<$ENV{ CATALYST_CONFIG_LOCAL_SUFFIX }>
-=item * C<$ENV{ MYAPP_CONFIG_LOCAL_SUFFIX }>
-
=item * C<$c-E<gt>config-E<gt>{ config_local_suffix }>
=back
@@ -179,8 +182,7 @@
sub get_config_local_suffix {
my $c = shift;
my $appname = ref $c || $c;
- my $suffix = $ENV{ CATALYST_CONFIG_LOCAL_SUFFIX }
- || $ENV{ Catalyst::Utils::class2env( $appname ) . '_CONFIG_LOCAL_SUFFIX' }
+ my $suffix = Catalyst::Utils::env_value( $c, 'CONFIG_LOCAL_SUFFIX' )
|| $c->config->{ config_local_suffix }
|| 'local';
More information about the Catalyst-commits
mailing list