From: Sebastian Riedel Date: Sun, 27 Nov 2005 23:07:43 +0000 (+0000) Subject: Fixed shebang line for generated scripts X-Git-Tag: 5.7099_04~819 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=8565f89d2f95ab6b5383faee6497609dc2480e03 Fixed shebang line for generated scripts --- diff --git a/Changes b/Changes index c17fe1e..c5f5231 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ This file documents the revision history for Perl extension Catalyst. 5.59 + - Fixed shebang line for generated scripts - Added REDIRECT_URL support - Fixed forward to classes ($c->forward(qw/MyApp foo/)) diff --git a/lib/Catalyst/Helper.pm b/lib/Catalyst/Helper.pm index bfdfefc..57a5a2d 100644 --- a/lib/Catalyst/Helper.pm +++ b/lib/Catalyst/Helper.pm @@ -2,6 +2,7 @@ package Catalyst::Helper; use strict; use base 'Class::Accessor::Fast'; +use Config; use File::Spec; use File::Path; use IO::File; @@ -69,7 +70,7 @@ sub mk_app { $self->{dir} =~ s/\:\:/-/g; $self->{script} = File::Spec->catdir( $self->{dir}, 'script' ); $self->{appprefix} = Catalyst::Utils::appprefix($name); - $self->{startperl} = '#!/usr/bin/perl -w'; + $self->{startperl} = "#!$Config{perlpath} -w"; $self->{scriptgen} = $Catalyst::CATALYST_SCRIPT_GEN || 4; $self->{author} = $self->{author} = $ENV{'AUTHOR'} || eval { @{ [ getpwuid($<) ] }[6] }