Fixed shebang line for generated scripts
Sebastian Riedel [Sun, 27 Nov 2005 23:07:43 +0000 (23:07 +0000)]
Changes
lib/Catalyst/Helper.pm

diff --git a/Changes b/Changes
index c17fe1e..c5f5231 100644 (file)
--- 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/))
 
index bfdfefc..57a5a2d 100644 (file)
@@ -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] }