Fixed: Minor typo in Intro.pod
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Helper.pm
index 05aca39..f4f2110 100644 (file)
@@ -8,6 +8,7 @@ use File::Path;
 use IO::File;
 use FindBin;
 use Template;
+our $CATALYST_SCRIPT_GEN = 2;
 
 my %cache;
 
@@ -58,6 +59,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;
@@ -455,7 +457,7 @@ plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
 
 all_pod_coverage_ok();
 
-__cgi_
+__cgi__
 [% startperl %] -w
 BEGIN { $ENV{CATALYST_ENGINE} = 'CGI' }
 
@@ -535,7 +537,10 @@ the same terms as perl itself.
 __server__
 [% startperl %] -w
 
-BEGIN { $ENV{CATALYST_ENGINE} = 'HTTP' }
+BEGIN { 
+    $ENV{CATALYST_ENGINE} = 'HTTP';
+    $ENV{CATALYST_SCRIPT_GEN} = [% scriptgen %];
+}  
 
 use strict;
 use Getopt::Long;
@@ -549,7 +554,7 @@ my $port = 3000;
 
 GetOptions( 'help|?' => \$help, 'port=s' => \$port );
 
-pod2usage(1) if \$help;
+pod2usage(1) if $help;
 
 [% name %]->run($port);
 
@@ -715,7 +720,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!');
 }