解决方法,参考 Re: Can't locate arybase.pm in @INC
> use Net::Telnet;
> ...
>
> F:\>pp -o test.exe test.pl
> <http://test.pl>
> F:\>test.exe
> Can't locate arybase.pm iin @INC
>
Net::Telnet references the long deprecated perl variable $[ which causes
arybase.pm to be loaded "behind the scene" (since Perl 5.16).
This isn't detected by Module::ScanDeps which is used by PAR::Packer to
find all the modules used by your script. Hence arybase.pm isn't packed
into test.exe and is missing when you run it.
An even smaller example of this is:
$ pp -o foo.exe -e '$['
There's several ways to work around this:
- use option -x for pp to not only analyze your script statically, but to
also run it once and observe what gets loaded at runtime
$ pp -o test.exe -x ...
But be aware of possible side effects.
- explicitly add arybase.pm with -M
$ pp -o test.exe -Marybase
Cheers, Roderich
Thread Previous
Can't locate arybase.pm in @INC by jason davis
Re: Can't locate arybase.pm in @INC by Roderich Schupp