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;
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 {
$ 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<head -n1 myscript.pl |grep '^#!'> 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<fatpack> script itself for more information.