Downloading all dependencies for a Perl module
This may be a duplicate question, so pardon my search skills.
I need to download all dependencies for a specific Perl module (local::lib and others) on a Windows/cygwin machine (with Perl 5.10.1) and move them to a Solaris machine (with Perl 5.8.8) that has no Internet connection.
I have seen minicpan suggested in this question, but creating a complete replica of a CPAN is not an option as I'm on a corporate network with limited bandwidth. CPAN::Mini has some filtering options, but it deals with paths instead of dependencies.
Is there a way to accomplish this?
Thanks,开发者_运维知识库
Ivan
Check out the cpan2dist
utility contained in the Perl distribution. (It's in /usr/bin
in my Cygwin installation.)
cpan2dist --help
Will create a distribution of type FMT of the modules specified on the command line, and all their prerequisites.
Can also create a distribution of type FMT from a local archive and all it's prerequisites
Haven't tried it, but it sounds like what you're after.
cpanminus has an option to do exactly that: --scandeps and --save-dists. Read more about that option on a blog post explaining the new features of cpanm 1.4.
精彩评论