4

I have a perl script which is deleting Logs files for me. Now I want to use this script on multiple other computers and on one server. The problem is, that I use some manual downloaded modules.

My question is, how can I export a perl script into a .zip with all used modules in the script?

What I'm trying to reach is, that I can put the .zip file on a different computer and run the script without any error caused by the manual imported modules.

poisn
  • 437
  • 2
  • 17

1 Answers1

8

Distribute as one program containing everything:

Alternatively, install the dependencies into a local subdirectory and add the subdirectory to the include path.

  • cpanm -L extlib Some::Module Yet::Another::Module More::Modules
daxim
  • 39,270
  • 4
  • 65
  • 132
  • The last option is also very similar to what [Carton](https://metacpan.org/pod/Carton) does (among other features). – Grinnz Oct 07 '19 at 15:08
  • If the modules are in a directory relative to the script, you probably want [How to locate local modules](https://stackoverflow.com/a/46550384/589924) rather than having to change `PERL5LIB`. – ikegami Oct 07 '19 at 16:48