Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Bug in App::FatPacker?

by elef (Friar)
on Dec 05, 2012 at 16:58 UTC ( #1007336=perlquestion: print w/replies, xml ) Need Help??
elef has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to pack some modules with App::FatPacker on a Ubuntu 12.4 VM with perl 5.14.2, and I'm running into what looks like a bug in the module.

The first command in the fatpacker synopsis (fatpack trace runs without error. When I run fatpack packlists-for `cat fatpacker.trace` >packlists, I get the following error message: Use of uninitialized value $_ in hash element at /usr/local/share/perl/5.14.2/App/ line 110, <> line 42.

Line 110 of is this: my %found; @found{map +($pack_rev{$INC{$_}}||()), @targets} = ();

It's part of this sub:

sub packlists_containing { my ($self, $targets) = @_; my @targets = @$targets; require $_ for @targets; my @search = grep -d $_, map catdir($_, 'auto'), @INC; my %pack_rev; my $cwd = cwd; find(sub { return unless $_ eq '.packlist' && -f $_; $pack_rev{$_} = $File::Find::name for lines_of $File::Find::name; }, @search); chdir($cwd) or die "Couldn't chdir back to ${cwd} after find: $!"; my %found; @found{map +($pack_rev{$INC{$_}}||()), @targets} = (); sort keys %found; }
This is just too tricky for me to troubleshoot. Should I install an earlier version of Ubuntu (years ago, I managed to get App::FatPacker to work on Ubuntu 8.04)?


I did some further testing. A test script that does not load any CPAN modules was processed by fatpacker without errors. The packed script was generated correctly.

The actual script I need to process loads Spreadsheet::WriteExcel and Spreadsheet::ParseExcel::Simple, so these are the two modules fatpacker would need to inline.

The fatpacker.trace file is as follows: List/ Spreadsheet/ParseExcel/ /usr/lib/perl/5.14/auto/POSIX/ Tie/ Spreadsheet/WriteExcel/ Spreadsheet/ Spreadsheet/WriteExcel/ Scalar/ Spreadsheet/ParseExcel/ Spreadsheet/WriteExcel/ File/ File/ warnings/ Spreadsheet/ParseExcel/ Spreadsheet/ParseExcel/ Spreadsheet/WriteExcel/ Spreadsheet/WriteExcel/ File/Spec/ Exporter/ Spreadsheet/WriteExcel/ Spreadsheet/WriteExcel/ IO/ Getopt/ Spreadsheet/ParseExcel/ Time/ Spreadsheet/ParseExcel/ unicore/ unicore/To/ Spreadsheet/ /usr/lib/perl/5.14/auto/POSIX/autosplit.ix OLE/ IO/ File/ Spreadsheet/WriteExcel/ Digest/Perl/ File/ Crypt/ Spreadsheet/ParseExcel/ Spreadsheet/ParseExcel/ IO/

Replies are listed 'Best First'.
Re: Bug in App::FatPacker?
by Anonymous Monk on Dec 05, 2012 at 17:29 UTC
    Its a warning, ignore it, and proceed to the next fatpacker step
      I can't continue; the packlists file generated is empty.

      I'm also getting BEGIN failed--compilation aborted at /usr/local/bin/fatpack line 3, <> line 42.

        I bet it's gotta do with the annoying stance of "we don't need no steenkin' packlists!" found among Debian/Ubuntu but also some other distro folks. They simply throw out all packlists before creating a DEB package, so naturally FatPacker (and a bunch of other stuff like Module::Installed) can't work.

        On Gentoo I have to deal with the same policy but at least it's easy to fix yourself as everything is installed from source. On Debianish systems I'm afraid your only solution is to forego the package manager and keep your own CPAN-installed and -updated module tree.

Re: Bug in App::FatPacker?
by elef (Friar) on Dec 06, 2012 at 23:11 UTC
    Status report: I finally solved this by installing Ubuntu 8.04 in a VM.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1007336]
Front-paged by Arunbear
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (10)
As of 2017-03-29 14:11 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (351 votes). Check out past polls.