I'm writing a script that uses some CPAN modules. What can I do so that co-workers can use my script without manually installing these CPAN modules?
Thanks!
I'm writing a script that uses some CPAN modules. What can I do so that co-workers can use my script without manually installing these CPAN modules?
Thanks!
Simply mark them as dependencies for your script. When he installs your script, cpan
/cpanm
will automatically install them too if needed.
If it's going to be shipped and installed, I definitely recommend packaging as a CPAN-style distribution with dependencies declared in the normal way (modules of note: Dist::Zilla, Module::Build, ExtUtils::MakeMaker.
However, there may be the odd occasion when shipping the dependencies with the script itself is desirable. For pure-perl dependencies and having played around a little bit, App::FatPacker seems to work OK (cpanm uses it itself).