X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FApp%2FFatPacker.pm;h=3a0bf06f5cc2870b546119d30241eb3b1f73df2c;hb=7180ec197a68ca3fc5c1326db1504bc828f5b001;hp=ced65453a3b004b2688e98a16c469d3b2c7c6e28;hpb=31f779e8f565f175cd634ea5d5e7bd0943fda2cb;p=p5sagit%2FApp-FatPacker.git diff --git a/lib/App/FatPacker.pm b/lib/App/FatPacker.pm index ced6545..3a0bf06 100644 --- a/lib/App/FatPacker.pm +++ b/lib/App/FatPacker.pm @@ -2,7 +2,6 @@ package App::FatPacker; use strict; use warnings FATAL => 'all'; -use 5.008001; use Getopt::Long; use Cwd qw(cwd); use File::Find qw(find); @@ -14,7 +13,7 @@ use File::Copy qw(copy); use File::Path qw(mkpath rmtree); use B qw(perlstring); -our $VERSION = '0.009011'; # 0.9.11 +our $VERSION = '0.009012'; # 0.9.012 $VERSION = eval $VERSION; @@ -210,6 +209,14 @@ sub script_command_file { unshift @INC, sub { if (my $fat = $fatpacked{$_[1]}) { + if ($] < 5.008) { + return sub { + return 0 unless length $fat; + $text =~ s/^([^\n]*\n?)//; + $_ = $1; + return 1; + }; + } open my $fh, '<', \$fat or die "FatPacker error loading $_[1] (could be a perl installation issue?)"; return $fh;