3
votes

I come across requirements to package a perl module with all its dependent modules, for systems where one cannot run cpan install (internet connectivity issues on production). However, from the linux system i can do cpan install, already have these modules installed. Is there a way i can mask the @INC directories from cpan command, and provide just one directory to look for all perl modules, so that it downloads all dependencies into that local directory.

Thanks in advance!!

1
The majority of CPAN modules need to be built specially for the target platform, and building them elsewhere can cause problems. Are you dealing with Perl-only modules? - Borodin

1 Answers

3
votes

Take a look at lib::core::only and local::lib - the first excludes all non-core paths from @INC, the second makes it easy to set up a local perl module directory.

The combination should solve the problem.