X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FHelper.pm;h=3d72db53ee768e7d2d77b7874509b31beba40198;hb=8e7b8bc309b0a08ed4491ddab3179dae28026c7d;hp=4485b8a30f8e58049650bb9b494250ab4951f950;hpb=098e9288719fb9dfe5b6d0ecfbb90cfad6f1a865;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Helper.pm b/lib/Catalyst/Helper.pm index 4485b8a..3d72db5 100644 --- a/lib/Catalyst/Helper.pm +++ b/lib/Catalyst/Helper.pm @@ -500,7 +500,7 @@ my $build = Catalyst::Build->new( ); $build->create_build_script; __readme__ -Run script/[% apprefix %]_server.pl to test the application. +Run script/[% appprefix %]_server.pl to test the application. __changes__ This file documents the revision history for Perl extension [% name %]. 0.01 [% time %] @@ -528,11 +528,16 @@ 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' } use strict; use FindBin; -use lib "$FindBin::Bin/../lib"; +use Path::Class; + +BEGIN { + $ENV{CATALYST_ENGINE} ||= 'CGI'; + use lib dir($FindBin::Bin)->parent->subdir('lib')->stringify; +} + use [% name %]; [% name %]->run; @@ -566,11 +571,15 @@ it under the same terms as perl itself. __fastcgi__ [% startperl %] -w -BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' } - use strict; use FindBin; -use lib "$FindBin::Bin/../lib"; +use Path::Class; + +BEGIN { + $ENV{CATALYST_ENGINE} ||= 'FastCGI'; + use lib dir($FindBin::Bin)->parent->subdir('lib')->stringify; +} + use [% name %]; [% name %]->run; @@ -604,16 +613,18 @@ it under the same terms as perl itself. __server__ [% startperl %] -w -BEGIN { - $ENV{CATALYST_ENGINE} ||= 'HTTP'; - $ENV{CATALYST_SCRIPT_GEN} = [% scriptgen %]; -} - use strict; use Getopt::Long; use Pod::Usage; use FindBin; -use lib "$FindBin::Bin/../lib"; +use Path::Class; + +BEGIN { + $ENV{CATALYST_ENGINE} ||= 'HTTP'; + $ENV{CATALYST_SCRIPT_GEN} = [% scriptgen %]; + use lib dir($FindBin::Bin)->parent->subdir('lib')->stringify; +} + use [% name %]; my $help = 0; @@ -662,13 +673,17 @@ it under the same terms as perl itself. __test__ [% startperl %] -w -BEGIN { $ENV{CATALYST_ENGINE} ||= 'Test' } - use strict; use Getopt::Long; use Pod::Usage; use FindBin; -use lib "$FindBin::Bin/../lib"; +use Path::Class; + +BEGIN { + $ENV{CATALYST_ENGINE} ||= 'Test'; + use lib dir($FindBin::Bin)->parent->subdir('lib')->stringify; +} + use [% name %]; my $help = 0; @@ -807,6 +822,7 @@ sub default : Private { } =back + [% END %] =head1 AUTHOR