Update fatunpack to deal with FatPacker #line

App-cpanminus-1.7004 brings a new syntax:

$fatpacked{"App/cpanminus.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_CPANMINUS';
This commit is contained in:
Petr Písař 2014-04-30 08:04:56 +02:00
parent d2a2c75da6
commit 247db4a6d3

View File

@ -20,7 +20,7 @@ eval { $filter = qr{$filter}; 1} or
my ($file, $filename, $delimiter);
while (<>) {
if (/^\$fatpacked\{\s*"([^"]*)"\s*\}\s*=\s*<<\s*'([^']*)'\s*;/) {
if (/^\$fatpacked\{\s*"([^"]*)"\s*\}\s*=.*<<\s*'([^']*)'\s*;/) {
# Packed module beginning found
$filename = $1;
$delimiter = $2;
@ -99,11 +99,11 @@ regular expression, i.e. to save all modules.
=head1 VERSION
This is version 1.
This is version 2.
=head1 COPYRIGHT
Copyright © 2013 Petr Písař <ppisar@redhat.com>.
Copyright © 2013, 2014 Petr Písař <ppisar@redhat.com>.
=head1 LICENSE