in reply to Re^7: Trying to use App::Fatpacker
in thread Trying to use App::Fatpacker

Thank you all for the detailed information, it now seems pretty clear how this should be done.
I did a bit of testing, and of course it's not that simple (it never is). For instance, HTML::Parser is made up of a bunch of modules that call each other, so I guess I'll need to paste each of them in my script and basically do a s/^use (.*)\;$/BEGIN \{ $1->import\(\) \}\;/ in them.
And then of course there are the external dependencies. E.g. HTML::TokeParser has use HTML::Tagset ();, so I'll have to download HTML::Tagset as well, and any dependencies it might have... I'm starting to see why a module was written in the first place for this purpose.

After pasting the HTML modules in my script and starting it, I got error messages about a bunch of subroutines being redefined. I think the various HTML::Parser modules contain the same subs multiple times (once in each module). So I'll either have to switch warnings and strict off, or I'll have to manually delete or rename subs. Oh joy...
If a kind App::FatPacker user ran it on these 3 modules for me, I would be very grateful.

Replies are listed 'Best First'.
Re^9: Trying to use App::Fatpacker
by Anonymous Monk on Nov 04, 2010 at 13:25 UTC
    ...and of course it's not that simple...
    One particular problem with HTML::Parser is that it has an XS component (compiled shared libarary code). This means you can't inline it into your script anyway. And, as far as I've understood from a quick look at the sources, App::FatPacker can't handle that either...

    In other words, to build a stand-alone distributable program, you'd need a more full-blown solution, like PAR or perl2exe.

      Thanks for the heads up.
      I have a workaround for HTML processing, so I'll use that then. Any idea if there are similar issues with Spreadsheet::WriteExcel?