Updated helper templates
Sebastian Riedel [Fri, 6 May 2005 22:48:16 +0000 (22:48 +0000)]
lib/Catalyst/Helper.pm

index 58f605e..a6bdc67 100644 (file)
@@ -416,22 +416,30 @@ our $VERSION = '0.01';
 
 [% name %]->setup;
 
-sub default : Private {
-    my ( $self, $c ) = @_;
-    $c->res->output('Congratulations, [% name %] is on Catalyst!');
-}
-
 =head1 NAME
 
-[% name %] - A very nice application
+[% name %] - Catalyst based application
 
 =head1 SYNOPSIS
 
-    Very simple to use
+    script/[% appprefix %]_server.pl
 
 =head1 DESCRIPTION
 
-Very nice application.
+Catalyst based application.
+
+=head1 METHODS
+
+=over4
+
+=item default
+
+=cut
+
+sub default : Private {
+    my ( $self, $c ) = @_;
+    $c->res->output('Congratulations, [% name %] is on Catalyst!');
+}
 
 =head1 AUTHOR
 
@@ -445,7 +453,6 @@ it under the same terms as perl itself.
 =cut
 
 1;
-
 __makefile__
     unless ( eval "use Module::Build::Compat 0.02; 1" ) {
         print "This module requires Module::Build to install itself.\n";
@@ -476,7 +483,6 @@ __makefile__
     Module::Build::Compat->run_build_pl( args => \@ARGV );
     require Module::Build;
     Module::Build::Compat->write_makefile( build_class => 'Module::Build' );
-
 __build__
 use strict;
 use Catalyst::Build;
@@ -491,22 +497,17 @@ my $build = Catalyst::Build->new(
     test_files         => [ glob('t/*.t'), glob('t/*/*.t') ]
 );
 $build->create_build_script;
-
 __readme__
 Run script/[% apprefix %]_server.pl to test the application.
-
 __changes__
 This file documents the revision history for Perl extension [% name %].
-
 0.01  [% time %]
         - initial revision, generated by Catalyst
-
 __apptest__
 use Test::More tests => 2;
 use_ok( Catalyst::Test, '[% name %]' );
 
 ok( request('/')->is_success );
-
 __podtest__
 use Test::More;
 
@@ -515,7 +516,6 @@ plan skip_all => 'Test::Pod 1.14 required' if $@;
 plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
 
 all_pod_files_ok();
-
 __podcoveragetest__
 use Test::More;
 
@@ -524,7 +524,6 @@ plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@;
 plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
 
 all_pod_coverage_ok();
-
 __cgi__
 [% startperl %] -w
 BEGIN { $ENV{CATALYST_ENGINE} ||= 'CGI' }
@@ -562,7 +561,6 @@ This library is free software. You can redistribute it and/or modify
 it under the same terms as perl itself.
 
 =cut
-
 __fastcgi__
 [% startperl %] -w
 
@@ -601,7 +599,6 @@ This library is free software. You can redistribute it and/or modify
 it under the same terms as perl itself.
 
 =cut
-
 __server__
 [% startperl %] -w
 
@@ -660,7 +657,6 @@ This library is free software. You can redistribute it and/or modify
 it under the same terms as perl itself.
 
 =cut
-
 __test__
 [% startperl %] -w
 
@@ -718,7 +714,6 @@ This library is free software. You can redistribute it and/or modify
 it under the same terms as perl itself.
 
 =cut
-
 __create__
 [% startperl %] -w
 
@@ -757,7 +752,6 @@ create.pl [options] model|view|controller name [helper] [options]
    create.pl model My::Model
    create.pl model SomeDB CDBI dbi:SQLite:/tmp/my.db
    create.pl model AnotherDB CDBI dbi:Pg:dbname=foo root 4321
-   create.pl Ajax
 
  See also:
    perldoc Catalyst::Manual
@@ -779,32 +773,37 @@ This library is free software. You can redistribute it and/or modify
 it under the same terms as perl itself.
 
 =cut
-
 __compclass__
 package [% class %];
 
 use strict;
 use base 'Catalyst::Base';
 
-[% IF type == 'C' %]
-sub default : Private {
-    my ( $self, $c ) = @_;
-    $c->res->output('Congratulations, [% class %] is on Catalyst!');
-}
-
-[% END %]
 =head1 NAME
 
 [% class %] - A Component
 
 =head1 SYNOPSIS
 
-    Very simple to use
+See L<[% app %]>
 
 =head1 DESCRIPTION
 
-Very nice component.
+Catalyst component.
+[% IF type == 'C' %]
+=head1 METHODS
+
+=over4
+
+=item default
 
+=cut
+
+sub default : Private {
+    my ( $self, $c ) = @_;
+    $c->res->output('Congratulations, [% class %] is on Catalyst!');
+}
+[% END %]
 =head1 AUTHOR
 
 [%author%]
@@ -817,7 +816,6 @@ it under the same terms as perl itself.
 =cut
 
 1;
-
 __comptest__
 [% IF type == 'C' %]
 use Test::More tests => 3;