X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FApp%2FFatPacker.pm;h=e4ca0aa7ee8b0dc46ff3900473ebad4302af1cca;hb=24b4367ec49fb45ad0a6200d4062799fafcf5ee8;hp=6f7a76b70462ea5df18f8ed9a99370383967044a;hpb=92cf1c69813fb2cf109fd6556d5ce632ab211ab7;p=p5sagit%2FApp-FatPacker.git diff --git a/lib/App/FatPacker.pm b/lib/App/FatPacker.pm index 6f7a76b..e4ca0aa 100644 --- a/lib/App/FatPacker.pm +++ b/lib/App/FatPacker.pm @@ -14,7 +14,7 @@ use File::Copy qw(copy); use File::Path qw(mkpath rmtree); use B qw(perlstring); -our $VERSION = '0.009010'; # 0.9.10 +our $VERSION = '0.009013'; # 0.9.013 $VERSION = eval $VERSION; @@ -210,6 +210,14 @@ sub script_command_file { unshift @INC, sub { if (my $fat = $fatpacked{$_[1]}) { + if ($] < 5.008) { + return sub { + return 0 unless length $fat; + $fat =~ s/^([^\n]*\n?)//; + $_ = $1; + return 1; + }; + } open my $fh, '<', \$fat or die "FatPacker error loading $_[1] (could be a perl installation issue?)"; return $fh; @@ -240,7 +248,7 @@ App::FatPacker - pack your dependencies onto your script file $ fatpack trace myscript.pl $ fatpack packlists-for `cat fatpacker.trace` >packlists $ fatpack tree `cat packlists` - $ (fatpack file; cat myscript.pl) >myscript.packed.pl + $ (head -n1 myscript.pl |grep '^#!'; fatpack file; cat myscript.pl) >myscript.packed.pl See the documentation for the L script itself for more information.