in reply to Re: PAR::Packer shebang + PAR::Heavy missing
in thread PAR::Packer shebang + PAR::Heavy missing

I've not given a lot of context, it's true : I'm trying to package a collection of Perl 5.8 scripts (actually the PerlPowerTools) as a single file, runnable anywhere and installable without knowledge of the Perl ecosystem (or with limited access rights).

For Windows, the obvious solution is to build an executable (no issue encountered so far). For other systems (most of them come with Perl installed), I see two inconvenients in building an executable as you suggest : 1) small source scripts (1MB) turn into a big executable (10MB) and 2) a different executable would be needed for every possible CPU, right? Please correct me if wrong, that's not my area of expertise. I agree with you that an executable solves many issues, but in this case they are non-existent, because the scripts are pure old Perl 5.8.

But maybe PAR::PAcker is not the right tool for that : what I did not understand is that an external PAR (not packed!) is needed to run a script packed with 'pp -P', and more confusion came because PAR seems to be shipped by default with macOS Perl and Strawberry Perl (even if not a core module). I thought the (uncompressed) Perl code present at the beginning of the packed file would be enough to extract the rest (Zip) transparently (again, please correct me if wrong).

Thanks!

  • Comment on Re^2: PAR::Packer shebang + PAR::Heavy missing

Replies are listed 'Best First'.
Re^3: PAR::Packer shebang + PAR::Heavy missing
by swl (Prior) on Oct 17, 2021 at 21:42 UTC

    Is 10MB really that big these days? If that is the total size then I don't see the problem since none of your target environments seem to be resource limited. If it is 10MB per exe then size is something to be concerned about given the number of utilities (and a quick check indicates that's the case).

    You also aren't restricted to 5.8. PerlPowerTools has passes for many recent perl versions across a range of OSes on CPAN Testers. http://matrix.cpantesters.org/?dist=PerlPowerTools+1.027

    I guess a more general question is whether you need to use the perl variants of these tools given that they are likely to be available on the unix variants, and there are ways of getting them for windows through systems such as cygwin and msys2? Strawberry perl comes with at least some of these utilities under its c/bin dir, so you could distribute those as a start. If you can determine where they are sourced from then you can probably get more from there.