[Catalyst-commits] r6719 - trunk/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin

bricas at dev.catalyst.perl.org bricas at dev.catalyst.perl.org
Wed Aug 22 20:32:24 GMT 2007


Author: bricas
Date: 2007-08-22 20:32:24 +0100 (Wed, 22 Aug 2007)
New Revision: 6719

Modified:
   trunk/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin/ConfigLoader.pm
Log:
add deprecation notices

Modified: trunk/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin/ConfigLoader.pm
===================================================================
--- trunk/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin/ConfigLoader.pm	2007-08-22 19:24:16 UTC (rev 6718)
+++ trunk/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin/ConfigLoader.pm	2007-08-22 19:32:24 UTC (rev 6719)
@@ -149,6 +149,12 @@
 
 sub get_config_path {
     my $c       = shift;
+
+    # deprecation notice
+    if( exists $c->config->{ file } ) {
+        $c->log->warn( q("file" config parameter has been deprecated in favor of "$c->config->{ 'Plugin::ConfigLoader' }->{ file }") );
+    }
+
     my $appname = ref $c || $c;
     my $prefix  = Catalyst::Utils::appprefix( $appname );
     my $path    = Catalyst::Utils::env_value( $c, 'CONFIG' )
@@ -188,6 +194,12 @@
 
 sub get_config_local_suffix {
     my $c       = shift;
+
+    # deprecation notice
+    if( exists $c->config->{ config_local_suffix } ) {
+        $c->log->warn( q("config_local_suffix" config parameter has been deprecated in favor of "$c->config->{ 'Plugin::ConfigLoader' }->{ config_local_suffix }") );
+    }
+
     my $appname = ref $c || $c;
     my $suffix  = Catalyst::Utils::env_value( $c, 'CONFIG_LOCAL_SUFFIX' )
         || $c->config->{ 'Plugin::ConfigLoader' }->{ config_local_suffix }




More information about the Catalyst-commits mailing list