From: Sebastian Riedel Date: Mon, 30 Jan 2006 17:10:54 +0000 (+0000) Subject: Added ConfigLoader support, LTjake needs to inline ConfigLoader and ConfigLoader... X-Git-Tag: 5.7099_04~716 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=1a7b17dbf72a1e66e91ccc0c9a139792983564a5 Added ConfigLoader support, LTjake needs to inline ConfigLoader and ConfigLoader::YAML --- diff --git a/Changes b/Changes index cdc628e..63c3f43 100644 --- a/Changes +++ b/Changes @@ -1,7 +1,7 @@ This file documents the revision history for Perl extension Catalyst. 5.64 - - Updated YAML support + - Updated YAML support to use ConfigLoader - Fixed path dispatch to canonicalise correctly (see http://dev.catalyst.perl.org/ticket/62) - Added Catalyst::Manual::About diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 8fedc9c..b30ecf1 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -21,7 +21,6 @@ use Scalar::Util qw/weaken/; use Tree::Simple qw/use_weak_refs/; use Tree::Simple::Visitor::FindByUID; use attributes; -use YAML (); __PACKAGE__->mk_accessors( qw/counter request response state action stack namespace/ @@ -601,15 +600,6 @@ sub setup { $class->setup_home( delete $flags->{home} ); - # YAML config support - my $confpath = $class->config->{file} - || $class->path_to( - ( Catalyst::Utils::appprefix( ref $class || $class ) . '.yml' ) ); - my $conf = {}; - $conf = YAML::LoadFile($confpath) if -f $confpath; - my $oldconf = $class->config; - $class->config( { %$oldconf, %$conf } ); - $class->setup_log( delete $flags->{log} ); $class->setup_plugins( delete $flags->{plugins} ); $class->setup_dispatcher( delete $flags->{dispatcher} ); diff --git a/lib/Catalyst/Helper.pm b/lib/Catalyst/Helper.pm index d965711..73f130a 100644 --- a/lib/Catalyst/Helper.pm +++ b/lib/Catalyst/Helper.pm @@ -537,7 +537,7 @@ use warnings; # Static::Simple: will serve static files from the application's root # directory # -use Catalyst qw/-Debug Static::Simple/; +use Catalyst qw/-Debug ConfigLoader Static::Simple/; our $VERSION = '0.01';