Improve example to include shebang line
[p5sagit/App-FatPacker.git] / lib / App / FatPacker.pm
index 62411b9..e4ca0aa 100644 (file)
@@ -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;
 
@@ -213,7 +213,7 @@ sub script_command_file {
         if ($] < 5.008) {
           return sub {
             return 0 unless length $fat;
-            $text =~ s/^([^\n]*\n?)//;
+            $fat =~ s/^([^\n]*\n?)//;
             $_ = $1;
             return 1;
           };
@@ -248,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<fatpack> script itself for more information.