installing fixed versions

nicholas on 2008-06-04T15:08:14

Dear lazyweb...

This must be a solved problem. One has a version control system, and one has a tarball of perl, and tarballs of a bunch of known versions of modules that one has downloaded from CPAN, which makes one decoupled from any subsequent changes or deletions on CPAN. What one wants to do is build perl, and then build all those module versions, from the local snapshotted versions.

So what's the best way to do this? The naïve, brute force, way is to build perl, and then loop round all the tarballs in order, extracting them, running Makefile.PL, ignore there whining about missing dependencies (as we're going to get to them), run make install, and hope - ie skipping all tests. However, this is also getting trapped by Makefile.PLs that decide that they want to ask questions, or things that really wanted Module::Build, etc.

What would be really nice would be to do it in the dependency order that the cpan shell would work out, but the danger of just using it is that it goes off and tries (helpfully) to download things that it can't find, which is not what is wanted. (If we goof, and fails to have a suitable version of the module, it's a fail)

So what's the best tool for this job?