in reply to Re^2: Help with pp - Perl Packer
in thread Help with pp - Perl Packer
Let's take the example code below:
use strict; use warnings; use Digest::MD5;
Let's say that was in a file named script.pl. If we run pp -o program.exe script.pl, pp would package in the Digest::MD5 module. But if you look at the Digest::MD5 module, it uses the Digest::Base module. Since the code above does not explicitly list Digest::Base, pp doesn't know that it needs to grab it.
That's where the -x and -c options come into play. They tell pp to run the script to pickup any additional run-time dependencies. In this case, by running pp -c -x -o program.exe script.pl, pp will discover that Digest::MD5 needs Digest::Base and will then add in Digest::Base. There are times pp will still miss required modules. In those cases, you can use the -M option to explicitly add in those modules.
This is just a super simple example that I came up with to help explain what the -c and -x options do. Others could perhaps give a better and/or more detailed explanation, but I'm hoping this helps you better understand those two options do.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Help with pp - Perl Packer
by perloHolic() (Beadle) on Jan 29, 2015 at 17:08 UTC |