Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

tsee (4409)

  {smueller} {at} {}

You can find most of my Open Source Perl software in my CPAN directory [].

Journal of tsee (4409)

Sunday July 19, 2009
12:02 PM

Reusable packaged applications with PAR::Packer

[ #39313 ]

PAR::Packer is a tool that can (among other things) create stand-alone binary executables from Perl scripts. It scans the code for dependencies and includes them in the executable.

Until now, it wasn't possible to reuse these perl-installation-in-one-file packages to run Perl code that wasn't part of the package. This proved to be a bit of a problem in some cases because many Perl applications expect to be able to simply use $^X or a verbatim "perl" executable to execute another instance of the same perl. For this reason, I just implemented the --reusable option to pp, the PAR Packager command line tool. Since this feature may have dubious security implications, it is disabled by default. To use it, you do this:

  pp --reusable -o myapp
  # works normally:

  # runs providing the module library that's part of the executable:
  ./myapp --par-options --reuse

If you try to use the --par-options --reuse option with an application that wasn't packaged to be --reusable, it will refuse to run.

The new feature requires a new PAR and PAR::Packer release. PAR 0.993 has been uploaded to CPAN. For PAR::Packer, you need the development version 0.992_01. If either one of those isn't available from your favourite mirror yet, you can find them here temporarily.


The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.