X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FHelper.pm;h=e8ad1d57856b35a4fbafb12fdf46b470806529c4;hp=3d72db53ee768e7d2d77b7874509b31beba40198;hb=5a59ef2a3aa839f6951c5ddd162678c127c177c2;hpb=abddf0b59648edaffc91dcfc8f82b08e05afeb17 diff --git a/lib/Catalyst/Helper.pm b/lib/Catalyst/Helper.pm index 3d72db5..e8ad1d5 100644 --- a/lib/Catalyst/Helper.pm +++ b/lib/Catalyst/Helper.pm @@ -528,16 +528,11 @@ 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 Path::Class; - -BEGIN { - $ENV{CATALYST_ENGINE} ||= 'CGI'; - use lib dir($FindBin::Bin)->parent->subdir('lib')->stringify; -} - +use lib "$FindBin::Bin/../lib"; use [% name %]; [% name %]->run; @@ -571,15 +566,11 @@ it under the same terms as perl itself. __fastcgi__ [% startperl %] -w +BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' } + use strict; use FindBin; -use Path::Class; - -BEGIN { - $ENV{CATALYST_ENGINE} ||= 'FastCGI'; - use lib dir($FindBin::Bin)->parent->subdir('lib')->stringify; -} - +use lib "$FindBin::Bin/../lib"; use [% name %]; [% name %]->run; @@ -613,18 +604,16 @@ 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 Path::Class; - -BEGIN { - $ENV{CATALYST_ENGINE} ||= 'HTTP'; - $ENV{CATALYST_SCRIPT_GEN} = [% scriptgen %]; - use lib dir($FindBin::Bin)->parent->subdir('lib')->stringify; -} - +use lib "$FindBin::Bin/../lib"; use [% name %]; my $help = 0; @@ -673,17 +662,13 @@ 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 Path::Class; - -BEGIN { - $ENV{CATALYST_ENGINE} ||= 'Test'; - use lib dir($FindBin::Bin)->parent->subdir('lib')->stringify; -} - +use lib "$FindBin::Bin/../lib"; use [% name %]; my $help = 0;