From: Brian Cassidy Date: Wed, 22 Aug 2007 19:32:24 +0000 (+0000) Subject: add deprecation notices X-Git-Tag: v0.16~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=afce197f767f69b7e4e5ad6e00276accc48e29fd;p=catagits%2FCatalyst-Plugin-ConfigLoader.git add deprecation notices --- diff --git a/lib/Catalyst/Plugin/ConfigLoader.pm b/lib/Catalyst/Plugin/ConfigLoader.pm index c73bf16..188bd1c 100644 --- a/lib/Catalyst/Plugin/ConfigLoader.pm +++ b/lib/Catalyst/Plugin/ConfigLoader.pm @@ -149,6 +149,12 @@ and will be removed in the next release. 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 @@ and will be removed in the next release. 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 }