Fixed: builtin actions are private too (Tutorial Docs)
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Helper.pm
index 2f3e2a7..ee6f6f9 100644 (file)
@@ -8,6 +8,7 @@ use File::Path;
 use IO::File;
 use FindBin;
 use Template;
+our $CATALYST_SCRIPT_GEN = 2;
 
 my %cache;
 
@@ -21,7 +22,7 @@ See L<Catalyst::Manual::Intro>
 
 =head1 DESCRIPTION
 
-Bootstrap a Catalyst application.
+Bootstrap a Catalyst application. Autogenerates scripts
 
 =head2 METHODS
 
@@ -49,6 +50,8 @@ sub get_file {
 
 =head3 mk_app
 
+Create the main application skeleton.
+
 =cut
 
 sub mk_app {
@@ -58,6 +61,7 @@ sub mk_app {
     $self->{dir}  = $name;
     $self->{dir} =~ s/\:\:/-/g;
     $self->{startperl} = $Config{startperl};
+    $self->{scriptgen}=$CATALYST_SCRIPT_GEN;
     $self->_mk_dirs;
     $self->_mk_appclass;
     $self->_mk_makefile;
@@ -74,6 +78,9 @@ sub mk_app {
 
 =head3 mk_component
 
+This method is called by create.pl to make new components
+for your application.
+
 =cut
 
 sub mk_component {
@@ -152,6 +159,8 @@ sub mk_component {
 
 =head3 mk_dir
 
+Surprisingly, this function makes a directory.
+
 =cut
 
 sub mk_dir {
@@ -169,6 +178,8 @@ sub mk_dir {
 
 =head3 mk_file
 
+writes content to a file.
+
 =cut
 
 sub mk_file {
@@ -207,7 +218,8 @@ sub next_test {
 
 =head3 render_file
 
-Render and create a file from a template in DATA.
+Render and create a file from a template in DATA using 
+Template Toolkit.
 
 =cut
 
@@ -359,8 +371,8 @@ Sebastian Riedel, C<sri@oook.de>
 
 =head1 LICENSE
 
-This library is free software . You can redistribute it and/or modify it under
-the same terms as perl itself.
+This library is free software . You can redistribute it and/or modify 
+it under the same terms as perl itself.
 
 =cut
 
@@ -405,8 +417,8 @@ Clever guy
 
 =head1 LICENSE
 
-This library is free software . You can redistribute it and/or modify it under
-the same terms as perl itself.
+This library is free software . You can redistribute it and/or modify 
+it under the same terms as perl itself.
 
 =cut
 
@@ -488,8 +500,8 @@ Sebastian Riedel, C<sri@oook.de>
 
 Copyright 2004 Sebastian Riedel. All rights reserved.
 
-This library is free software. You can redistribute it and/or modify it under
-the same terms as perl itself.
+This library is free software. You can redistribute it and/or modify 
+it under the same terms as perl itself.
 
 =cut
 
@@ -527,15 +539,18 @@ Sebastian Riedel, C<sri@oook.de>
 
 Copyright 2004 Sebastian Riedel. All rights reserved.
 
-This library is free software. You can redistribute it and/or modify it under
-the same terms as perl itself.
+This library is free software. You can redistribute it and/or modify 
+it under the same terms as perl itself.
 
 =cut
 
 __server__
 [% startperl %] -w
 
-BEGIN { $ENV{CATALYST_ENGINE} = 'HTTP' }
+BEGIN { 
+    $ENV{CATALYST_ENGINE} = 'HTTP';
+    $ENV{CATALYST_SCRIPT_GEN} = [% scriptgen %];
+}  
 
 use strict;
 use Getopt::Long;
@@ -583,8 +598,8 @@ Sebastian Riedel, C<sri@oook.de>
 
 Copyright 2004 Sebastian Riedel. All rights reserved.
 
-This library is free software. You can redistribute it and/or modify it under
-the same terms as perl itself.
+This library is free software. You can redistribute it and/or modify 
+it under the same terms as perl itself.
 
 =cut
 
@@ -641,8 +656,8 @@ Sebastian Riedel, C<sri@oook.de>
 
 Copyright 2004 Sebastian Riedel. All rights reserved.
 
-This library is free software. You can redistribute it and/or modify it under
-the same terms as perl itself.
+This library is free software. You can redistribute it and/or modify 
+it under the same terms as perl itself.
 
 =cut
 
@@ -702,8 +717,8 @@ Sebastian Riedel, C<sri\@oook.de>
 
 Copyright 2004 Sebastian Riedel. All rights reserved.
 
-This library is free software. You can redistribute it and/or modify it under
-the same terms as perl itself.
+This library is free software. You can redistribute it and/or modify 
+it under the same terms as perl itself.
 
 =cut
 
@@ -715,7 +730,7 @@ use base 'Catalyst::Base';
 
 [% IF type == 'C' %]
 sub default : Private {
-    my ( $self, $c ) = \@_;
+    my ( $self, $c ) = @_;
     $c->res->output('Congratulations, [% class %] is on Catalyst!');
 }
 
@@ -738,8 +753,8 @@ Clever guy
 
 =head1 LICENSE
 
-This library is free software . You can redistribute it and/or modify it under
-the same terms as perl itself.
+This library is free software . You can redistribute it and/or modify 
+it under the same terms as perl itself.
 
 =cut