How do I find the module dependencies of my Perl script?

Check out Module::ScanDeps and the “scandeps.pl” utility that comes with it. It can do a static (and recursive) analysis of your code for dependencies as well as the %INC dump either after compiling or running the program. Please note that the static source scanning always errs on the side of including too many dependencies. (It … Read more

How do I automate CPAN configuration?

Since it hasn’t been mentioned yet, cpanminus is a zero-conf cpan installer. And you can download a self-contained executable if it isn’t available for your version control. The cpanm executable is easily installed (as documented in the executable itself) with: curl -L http://cpanmin.us | perl – –self-upgrade # or wget -O – http://cpanmin.us | perl … Read more

How can I install a CPAN module into a local directory?

Other answers already on Stackoverflow: How do I install modules locally without root access… How can I use a new Perl module without install permissions? From perlfaq8: How do I keep my own module/library directory? When you build modules, tell Perl where to install the modules. For Makefile.PL-based distributions, use the INSTALL_BASE option when generating … Read more

Which cpan installer is the right one? (CPAN.pm/CPANPLUS/cpanminus)

CPAN.pm (cpan) is the original client. It comes with Perl, so you already have it. It has the most features. It has a lot of configuration options to customize the way it works, though virtually everyone accepts the default installation. It integrates easily with local::lib. cpanminus (cpanm) is an attempt to make a zero-configuration client … Read more