X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FHelper.pm;h=e3176e5b9aef7b9d88584c7790e767701e746ebc;hb=9bc8b354901fa65de2f8cdd64f0732df05a1668a;hp=97c0f56d58794e3deee1a28d4d9ba16b6fd025bb;hpb=11d090846da613b5f4fdc5efee5b8cae806cc0dd;p=catagits%2FCatalyst-Devel.git diff --git a/lib/Catalyst/Helper.pm b/lib/Catalyst/Helper.pm index 97c0f56..e3176e5 100644 --- a/lib/Catalyst/Helper.pm +++ b/lib/Catalyst/Helper.pm @@ -58,7 +58,9 @@ sub mk_app { $self->{script } = File::Spec->catdir( $self->{dir}, 'script' ); $self->{appprefix } = Catalyst::Utils::appprefix($name); $self->{appenv } = Catalyst::Utils::class2env($name); - $self->{startperl } = "#!$Config{perlpath} -w"; + $self->{startperl } = -r '/usr/bin/env' + ? '#!/usr/bin/env perl' + : "#!$Config{perlpath} -w"; $self->{scriptgen } = $Catalyst::Devel::CATALYST_SCRIPT_GEN || 4; $self->{catalyst_version} = $Catalyst::VERSION; $self->{author } = $self->{author} = $ENV{'AUTHOR'} @@ -499,8 +501,8 @@ So when you call C, create will try to execute Catalyst::Helper::View::TT->mk_compclass and Catalyst::Helper::View::TT->mk_comptest. -See L and L for -examples. +See L and +L for examples. All helper classes should be under one of the following namespaces. @@ -544,36 +546,41 @@ There is no fallback for this method. These are the methods that the Helper classes can call on the <$helper> object passed to them. -=head2 render_file +=head2 render_file ($file, $path, $vars) -Render and create a file from a template in DATA using -Template Toolkit. +Render and create a file from a template in DATA using Template +Toolkit. $file is the relevent chunk of the __DATA__ section, $path is +the path to the file and $vars is the hashref as expected by +L