Clean up, no moose here.
[catagits/Catalyst-Devel.git] / lib / Catalyst / Helper.pm
index 83e7c83..9e84b23 100644 (file)
@@ -1,5 +1,4 @@
 package Catalyst::Helper;
-#use Moose;
 use Config;
 use File::Spec;
 use File::Path;
@@ -12,7 +11,6 @@ use Catalyst::Utils;
 use Catalyst::Exception;
 use Path::Class qw/dir file/;
 use File::ShareDir qw/dist_dir/;
-#use namespace::autoclean;
 
 my %cache;
 
@@ -82,7 +80,7 @@ sub mk_app {
     $self->{startperl       } = -r '/usr/bin/env'
                                 ? '#!/usr/bin/env perl'
                                 : "#!$Config{perlpath} -w";
-    $self->{scriptgen       } = $Catalyst::Devel::CATALYST_SCRIPT_GEN || 4;
+    $self->{scriptgen       } = $Catalyst::Devel::CATALYST_SCRIPT_GEN || 34;
     $self->{catalyst_version} = $Catalyst::VERSION;
     $self->{author          } = $self->{author} = $ENV{'AUTHOR'}
       || eval { @{ [ getpwuid($<) ] }[6] }
@@ -93,33 +91,26 @@ sub mk_app {
     my $gen_app = ( $self->{scripts} || $self->{makefile} ) ? 0 : 1;
 
     if ($gen_app) {
-    
-        
-        $self->_mk_dirs;
-        $self->_mk_config;
-        $self->_mk_appclass;
-        $self->_mk_rootclass;
-        $self->_mk_readme;
-        $self->_mk_changes;
-        $self->_mk_apptest;
-        $self->_mk_images;
-        $self->_mk_favicon;
+        for ( qw/ _mk_dirs _mk_config _mk_appclass _mk_rootclass _mk_readme
+              _mk_changes _mk_apptest _mk_images _mk_favicon/ ) {
+            
+            $self->$_;
+        }
     }
     if ($gen_makefile) {
         $self->_mk_makefile;
     }
     if ($gen_scripts) {
-        $self->_mk_cgi;
-        $self->_mk_fastcgi;
-        $self->_mk_server;
-        $self->_mk_dbic_deploy;
-        $self->_mk_test;
-        $self->_mk_create;
-        $self->_mk_information;
+        for ( qw/ _mk_cgi _mk_fastcgi _mk_server 
+                  _mk_test _mk_create _mk_information / ) {
+        $self->$_;
     }
     return $self->{dir};
 }
 
+
+## not much of this can really be changed, mk_compclass must be left for 
+## backcompat
 sub mk_component {
     my $self = shift;
     my $app  = shift;
@@ -190,6 +181,7 @@ sub mk_component {
                     message => qq/Couldn't load helper "$class", "$@"/ );
             }
 
+            ## must be left for back compat! ###################################
             if ( $class->can('mk_compclass') ) {
                 return 1 unless $class->mk_compclass( $self, @args );
             }
@@ -199,6 +191,7 @@ sub mk_component {
                 $class->mk_comptest( $self, @args );
             }
             else { $self->_mk_comptest }
+            ####################################################################
         }
 
         # Fallback
@@ -527,10 +520,6 @@ development stage.
 The catalyst test server, starts an HTTPD which outputs debugging to
 the terminal.
 
-=head2 _deploy_dbic.pl
-
-Deploy a L<DBIx::Class> schema to the database of your choice. 
-
 =head2 _test.pl
 
 A script for running tests from the command-line.
@@ -592,7 +581,8 @@ L<Catalyst::Helper::Model::Adaptor> - wrap any class into a Catalyst model
 
 =head3 NOTE
 
-The helpers will read author name from /etc/passwd by default. + To override, please export the AUTHOR variable.
+The helpers will read author name from /etc/passwd by default.
+To override, please export the AUTHOR variable.
 
 =head1 METHODS
 
@@ -688,7 +678,6 @@ Render a template/image file from our share directory
 
 =cut
 
-
 =head1 NOTE
 
 The helpers will read author name from /etc/passwd by default.
@@ -708,8 +697,6 @@ Catalyst Contributors, see Catalyst.pm
 This library is free software. You can redistribute it and/or modify
 it under the same terms as Perl itself.
 
-=begin pod_to_ignore
-
 =cut
 
 1;