Removed YAML support
Sebastian Riedel [Thu, 26 Jan 2006 16:25:36 +0000 (16:25 +0000)]
Changes
Makefile.PL
lib/Catalyst.pm
lib/Catalyst/Helper.pm

diff --git a/Changes b/Changes
index 2f33db4..8ac6770 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,8 +1,7 @@
 This file documents the revision history for Perl extension Catalyst.
 
 5.64
-
-        - Switched to YAML::Syck
+        - Removed YAML support
 
 5.63
         - Updated prereq versions
index 3b246d5..6bb37d1 100644 (file)
@@ -33,8 +33,6 @@ requires 'URI' => 1.35;
 requires 'File::Copy::Recursive';
 requires 'Module::Install::Admin' => '0.54';
 requires 'Module::Install'        => '0.54';
-requires 'YAML::Syck'             => '0.28';
-requires 'File::Slurp';
 
 feature 'Apache/mod_perl Support',
   -default                   => 0,
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} );
index d965711..8d3fbb7 100644 (file)
@@ -82,7 +82,6 @@ sub mk_app {
 
     if ($gen_app) {
         $self->_mk_dirs;
-        $self->_mk_config;
         $self->_mk_appclass;
         $self->_mk_readme;
         $self->_mk_changes;
@@ -355,14 +354,6 @@ sub _mk_makefile {
     }
 }
 
-sub _mk_config {
-    my $self      = shift;
-    my $dir       = $self->{dir};
-    my $appprefix = $self->{appprefix};
-    $self->render_file( 'config',
-        File::Spec->catfile( $dir, "$appprefix.yml" ) );
-}
-
 sub _mk_readme {
     my $self = shift;
     my $dir  = $self->{dir};
@@ -542,6 +533,11 @@ use Catalyst qw/-Debug Static::Simple/;
 our $VERSION = '0.01';
 
 #
+# Configure the application
+#
+__PACKAGE__->config( { name => '[% name %]' } );
+
+#
 # Start the application
 #
 __PACKAGE__->setup;
@@ -615,9 +611,6 @@ catalyst;
 install_script glob('script/*.pl');
 auto_install;
 WriteAll;
-__config__
----
-name: [% name %]
 __readme__
 Run script/[% appprefix %]_server.pl to test the application.
 __changes__