Added ConfigLoader support, LTjake needs to inline ConfigLoader and ConfigLoader...
Sebastian Riedel [Mon, 30 Jan 2006 17:10:54 +0000 (17:10 +0000)]
Changes
lib/Catalyst.pm
lib/Catalyst/Helper.pm

diff --git a/Changes b/Changes
index cdc628e..63c3f43 100644 (file)
--- 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
index 8fedc9c..b30ecf1 100644 (file)
@@ -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} );
index d965711..73f130a 100644 (file)
@@ -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';