I'm trying to use pp (the perl compiler) to create an application that can run independent of the perl installed library and interpreter.
It successfully creates a compiled executable although I had to use the -x -c options to get it to find dependencies successfully. It will run on my machine but when I try it on another machine I get this error so clearly there is still some dependency:
501 Protocol scheme 'https' is not supported (LWP::Protocol::https not installed)
I am running it on MacOS 10.14.1 if that makes any difference. Thanks!
LWP::Protocol::https is loaded dynamically when needed, so
pp
has no way of knowing it's needed by default.Solution 1
Pass
-x
topp
, and make sure the module is actually loaded in the runpp
uses to determine the modules to include. This would probably be achieved by using LWP to make an HTTPS request during that run.--xargs=...
might come in useful for this.Solution 2
Pass
-M LWP::Protocol::https
topp
. You could also pass-M 'LWP::Protocol::**'
to get all protocols handlers you have installed.Solution 3
Add
use LWP::Protocol::https ();
to your script or an included module. Including a comment indicating why you are doing this would be appropriate.