X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FApp%2FFatPacker.pm;h=b96833297b6a07446c442f2783d141979fb8749b;hb=436d4ea8a3a8ea4bd67ed00a237389c2a602cd52;hp=881c38f167d4a4861d14f31d35f000f0ec04d7a2;hpb=87108237c760fbf54141056f6f3a0f0a62fb1001;p=p5sagit%2FApp-FatPacker.git diff --git a/lib/App/FatPacker.pm b/lib/App/FatPacker.pm index 881c38f..b968332 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.009012'; # 0.9.012 +our $VERSION = '0.009013'; # 0.9.013 $VERSION = eval $VERSION; @@ -187,7 +187,7 @@ sub script_command_file { my ($self, $args) = @_; my $file = shift @$args; my $cwd = cwd; - my @dirs = map rel2abs($_, $cwd), ('lib','fatlib'); + my @dirs = grep -d, map rel2abs($_, $cwd), ('lib','fatlib'); my %files; foreach my $dir (@dirs) { find(sub { @@ -248,7 +248,10 @@ 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 + +The C code pulls out the Unix shebang +line, if there is one, and injects it at the start of the packed script. See the documentation for the L script itself for more information.