in reply to Installing CPAN Modules within BEGIN of PERL Script
Based on your first sentence, I would opt to go another route.
One thought would be to write your own module(s) that require other modules and provide instructions for your users on how to properly install the needed modules for your code to work. But then you have the challenge of being tech support to help debug installation issues. And both this route and what you have attempted are depending on internet access to be able to download and install needed modules.
The approach that I would take would be to use the pp utility from PAR::Packer to bundle the code into a stand alone executable and then distribute the executable. This eliminates the need to provide support to modify/maintain the proper Perl environment on your users' systems.
(NOTE: This recommendation is not about making the code run faster or obfuscating the source code. The motivation is to simplify support and maintenance - i.e. maintain a Perl development environment on an OS similar to what end users will use and just provide the stand alone executable.)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Installing CPAN Modules within BEGIN of PERL Script
by GhostCode (Initiate) on Aug 18, 2021 at 23:02 UTC |