Fixed shebang line for generated scripts
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Helper.pm
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] }