Skip to content

Commit

Permalink
if $^X is just "perl" use perlpath
Browse files Browse the repository at this point in the history
otherwise if you run "perl ./Build" you get an unusable Build.PL
  • Loading branch information
rjbs committed Oct 8, 2010
1 parent 1db072f commit a561254
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Acme/Module/Build/Tiny.pm
Expand Up @@ -82,7 +82,8 @@ sub import {
};
print "Creating new 'Build' script for '$meta->{name}'" .
" version '$meta->{version}'\n";
_spew('Build' => "#!$^X\n", _slurp( $INC{_mod2pm(shift)} ) );
my $perl = $^X =~ /\Aperl[.0-9]*\z/ ? $Config{perlpath} : $^X;
_spew('Build' => "#!$perl\n", _slurp( $INC{_mod2pm(shift)} ) );
chmod 0755, 'Build';
_spew( '_build/prereqs', _data_dump(_find_prereqs()) );
_spew( '_build/build_params', _data_dump($opt) );
Expand Down

0 comments on commit a561254

Please sign in to comment.