Perl – How to install a specific version of a set of Perl modules


I'm tasked with replicating a production environment to create many test/sit environments.

One of the things I need to do is build up Perl, with all the modules which have been installed (including internal and external modules) over the years. I could just use autobundle, but this will result in the test environment having much newer versions of the external modules that production has.

What is the easiest/best way to get and install (a lot of) version specific Perl modules.

Best Solution

bdfoy has the best large scale solution, but if you just want to install a few modules you can ask the CPAN shell to install a specific distribution by referencing a path to a tarball (relative to the top of the CPAN tree).

cpan> install MSCHWERN/Test-Simple-0.62.tar.gz

Throw a URL to BackPAN into your URL list and you can install any older version.

cpan> o conf urllist push

This is in the FAQ under "how do I install a 'DEVELOPER RELEASE' of a module?"