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.

1

1 Answer 1

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
Sign up to request clarification or add additional context in comments.

2 Comments

The last option is also very similar to what Carton does (among other features).
If the modules are in a directory relative to the script, you probably want How to locate local modules rather than having to change PERL5LIB.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.