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!!
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.