I have Perl 5.13.4 with a large collection of installed CPAN modules.
I have just compiled Perl 5.14.0. I'd like to install (recompile) all the modules in 5.13.4 into 5.14.0.
I can/have generated a bundle of the installed modules with 'cpanp' and the 'b' option; I now have a file ~/.cpanplus/5.13.4/dist/autobundle/Snapshot_2011_05_18_00.pm
.
What is the command to use in the 5.14.0 version of 'cpanp' that will go through that snapshot bundle and ensure 5.14.0 has all those modules installed?
Or, if the combination of cpanp and a bundle isn't the appropriate way to go, what is the easiest way to replicate (recompile) the modules installed in the old version of Perl for the new version of Perl? (If CPAN can deal with the bundle file, I'll use it - it is the result I care about, not the mechanism used to achieve it.)
(I did take a quick look at the list of questions for 'perl cpanplus bundle' here on SO without finding the information I'm after. I've also looked at 'perldoc cpanp' on several occasions and failed to find the information I'm after. That isn't the same as saying "the information is not there"; it may simply mean I've not spotted it.)
A bundle file is a CPAN special-cased thing that - to my surprise - does not happen to also work in CPANPLUS. That's why no one talks of CPANPLUS bundles and you couldn't find anything. So employ CPAN. First find out where your CPAN root is, by default it's ~/.cpan
or ~/.local/share/.cpan
on a Free Desktop XDG-compliant system. Alter the instructions accordingly.
mkdir -p ~/.cpan/Bundle
mv ~/.cpanplus/5.13.4/dist/autobundle/Snapshot_2011_05_18_00.pm ~/.cpan/Bundle
cpan Bundle::Snapshot_2011_05_18_00 # DTRT
As you were talking about recompile, CPAN has that command and you can issue it from either the CPAN shell or as API call from the command-line, but it's useful only if you have modules at a fixed location across versions of Perl.
CPANPLUS autobundles work fine as of now. Just be sure to reference the bundle with 'file://
' prefixed to the full path of the bundle.
There will certainly be some diddlin' that you'll have to do with some modules, but for the most part it should be completely doable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With