Version 1.28
[catagits/Catalyst-Devel.git] / lib / Catalyst / Helper.pm
index 195af7d..3b182ad 100644 (file)
@@ -18,7 +18,7 @@ use namespace::autoclean;
 with 'MooseX::Emulate::Class::Accessor::Fast';
 
 # Change Catalyst/Devel.pm also
-our $VERSION = '1.22';
+our $VERSION = '1.28';
 
 my %cache;
 
@@ -35,7 +35,10 @@ Catalyst::Helper - Bootstrap a Catalyst application
 sub get_sharedir_file {
     my ($self, @filename) = @_;
     my $dist_dir;
-    if (-d "inc/.author" && -f "lib/Catalyst/Helper.pm"
+    if (exists $ENV{CATALYST_DEVEL_SHAREDIR}) {
+        $dist_dir = $ENV{CATALYST_DEVEL_SHAREDIR};
+    }
+    elsif (-d "inc/.author" && -f "lib/Catalyst/Helper.pm"
             ) { # Can't use sharedir if we're in a checkout
                 # this feels horrible, better ideas?
         $dist_dir = 'share';
@@ -87,7 +90,7 @@ sub mk_app {
     $self->{appenv          } = Catalyst::Utils::class2env($name);
     $self->{startperl       } = -r '/usr/bin/env'
                                 ? '#!/usr/bin/env perl'
-                                : "#!$Config{perlpath} -w";
+                                : "#!$Config{perlpath}";
     $self->{scriptgen       } = $Catalyst::Devel::CATALYST_SCRIPT_GEN;
     $self->{catalyst_version} = $Catalyst::VERSION;
     $self->{author          } = $self->{author} = $ENV{'AUTHOR'}