- Fixes for rt.cpan #17322 and #17331
[catagits/Catalyst-Runtime.git] / lib / Catalyst.pm
index b1f8578..8ed0016 100644 (file)
@@ -21,8 +21,6 @@ use Scalar::Util qw/weaken/;
 use Tree::Simple qw/use_weak_refs/;
 use Tree::Simple::Visitor::FindByUID;
 use attributes;
-use YAML::Syck;
-use File::Slurp;
 
 __PACKAGE__->mk_accessors(
     qw/counter request response state action stack namespace/
@@ -447,13 +445,7 @@ sub view {
 
 Returns or takes a hashref containing the application's configuration.
 
-    __PACKAGE__->config({ db => 'dsn:SQLite:foo.db' });
-
-You can also use a L<YAML> config file like myapp.json in your
-applications home directory.
-
-    ---
-    db: dsn:SQLite:foo.db
+    __PACKAGE__->config( { db => 'dsn:SQLite:foo.db' } );
 
 =head2 $c->debug
 
@@ -591,18 +583,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 = {};
-    if ( -f $confpath ) {
-        my $content = read_file("$confpath");
-        $conf = YAML::Syck::Load($content);
-    }
-    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} );