X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FApp%2FFatPacker.pm;fp=lib%2FApp%2FFatPacker.pm;h=bd36684d7b346257ce179e37b3ad5f18c428e5e7;hb=7bf1d4f2df5bc965471419258e2242557604ab6f;hp=ced65453a3b004b2688e98a16c469d3b2c7c6e28;hpb=bf1955157c30ccd6609c233fcc48dfb34ea47a37;p=p5sagit%2FApp-FatPacker.git diff --git a/lib/App/FatPacker.pm b/lib/App/FatPacker.pm index ced6545..bd36684 100644 --- a/lib/App/FatPacker.pm +++ b/lib/App/FatPacker.pm @@ -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; + $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;