Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
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 myscript.pl) 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/FatPacker.pm line 110, <> line 42.

Line 110 of FatPacker.pm 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)?

EDIT:

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:

POSIX.pm List/Util.pm Spreadsheet/ParseExcel/Cell.pm /usr/lib/perl/5.14/auto/POSIX/load_imports.al Tie/Hash.pm Cwd.pm Spreadsheet/WriteExcel/OLEwriter.pm Spreadsheet/ParseExcel.pm Fcntl.pm Symbol.pm Spreadsheet/WriteExcel/Chart.pm Scalar/Util.pm Spreadsheet/ParseExcel/Format.pm Spreadsheet/WriteExcel/BIFFwriter.pm File/Spec.pm File/Glob.pm warnings/register.pm Spreadsheet/ParseExcel/Workbook.pm Spreadsheet/ParseExcel/Utility.pm Spreadsheet/WriteExcel/Properties.pm utf8.pm Spreadsheet/WriteExcel/Worksheet.pm File/Spec/Unix.pm Exporter/Heavy.pm vars.pm Spreadsheet/WriteExcel/Formula.pm Spreadsheet/WriteExcel/Workbook.pm AutoLoader.pm IO/Handle.pm Getopt/Long.pm SelectSaver.pm Spreadsheet/ParseExcel/Worksheet.pm Time/Local.pm Spreadsheet/ParseExcel/Font.pm unicore/Heavy.pl unicore/To/Fold.pl Spreadsheet/WriteExcel.pm /usr/lib/perl/5.14/auto/POSIX/autosplit.ix OLE/Storage_Lite.pm FindBin.pm IO/Seekable.pm File/Copy.pm Spreadsheet/WriteExcel/Format.pm threads.pm Digest/Perl/MD5.pm File/Basename.pm Config.pm integer.pm IO.pm if.pm Carp.pm Crypt/RC4.pm FileHandle.pm Spreadsheet/ParseExcel/Simple.pm utf8_heavy.pl constant.pm Spreadsheet/ParseExcel/FmtDefault.pm overload.pm IO/File.pm feature.pm

In reply to Bug in App::FatPacker? by elef

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others chilling in the Monastery: (7)
    As of 2014-07-31 06:05 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite superfluous repetitious redundant duplicative phrase is:









      Results (245 votes), past polls