Skip Menu |

This queue is for tickets about the App-FatPacker CPAN distribution.

Report information
The Basics
Id: 78391
Status: resolved
Priority: 0/
Queue: App-FatPacker

Owner: Nobody in particular
Requestors: WINTER [...]

Bug Information
Severity: Important
Broken in: 0.009007
Fixed in: (no value)

Subject: packlists-for crashes when modules change $_ when required
Download (untitled) / with headers
text/plain 847b
This is biting Digest::Perl::MD5's code generation in particular, but a simpler example is: $ cat > package A; while (<DATA>) { # do nothing } 1; __DATA__ ^D $ packlists-for I get a result of: Use of uninitialized value $_ in hash element at .../perl-5.16.0/lib/site_perl/5.16.0/App/ line 110, <> line 10. BEGIN failed--compilation aborted at .../perl-5.16.0/bin/fatpack line 3, <> line 10. The culprit is the packlists_containing method. It loads all of the target packages with: require $_ for @targets; If a module (like Digest::Perl::MD5) modifies $_ then @targets gets modified too. This can be fixed by just golfing less and making a local copy of the target to be required: for my $package_name (@targets) { require $package_name; }
Subject: fatpacker.patch
Download fatpacker.patch
text/x-diff 473b
diff --git a/lib/App/ b/lib/App/ index 62a1612..773d8ae 100644 --- a/lib/App/ +++ b/lib/App/ @@ -102,7 +102,9 @@ sub script_command_packlists_for { sub packlists_containing { my ($self, $targets) = @_; my @targets = @$targets; - require $_ for @targets; + for my $package_name (@targets) { + require $package_name; + } my @search = grep -d $_, map catdir($_, 'auto'), @INC; my %pack_rev; my $cwd = cwd;
Fixed in 0.9.8

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to