in reply to Re^2: How to move 3 years of modules to my new XP box?
in thread How to move 3 years of modules to my new XP box?
Corion is being a little too terse.
Once you've used the CPAN.pm or CPANPLUS.pm system to create an autobundle file on one machine, you can copy it to another machine and use the CPAN or CPANPLUS "install" command on the bundle file and it will automatically install the modules from cpan. This takes awhile, and it's far from painless, but I think it's more likely to work that just trying to copy perl installations from one box to another (remember: some "perl" modules contain C code that needs to be compiled and any architectural changes will screw these up. And aren't you upgrading your perl version? The perl version is in the path to your modules, and I suggest that it's there for a reason).
So what you do is something like this:
Or alternately:perl -MCPANPLUS -e'shell' b
perl -MCPAN -e'shell' autobundle
Note that when it finishes it will tell you where it wrote the bundle file.
Bundle files are modules that contain only POD, with a CONTENTS section that contains the actual listing of module names, associating module name with version number.
Chromatic's "Perl Hacks", provides a script (Hack #32) to trim modules from a bundle if they are listed in Module::Corelist.
An even worse problem in my opinion is that this system tries to preserve version numbers. You're far more likely (for a development machine, at least) to want the latest version of everything than a precise clone of the original.
You can do that by hacking the bundle file first, and by replacing all the version numbers (the second column) with the string 'undef'.
Then, after copying your hacked bundle file to the target machine, you once again run either the CPAN.pm or CPANPLUS.pm shell and use the "install" command on the bundle.
You must have CPAN/CPANPLUS set up to deal with dependencies automatically, otherwise this is useless.
Even so, it's likely you'll run into snags along the way. You'll have to get very lucky to just let the install chug over night. More likely, you'll find it got stuck on some problem you'll need to solve manually and then re-start.
I suggest that before restarting you make note of the last successfully installed module, and delete the ones that you don't need to look at again from the bundle file.
If any of this sounds fugly, it's because it is. This is a problem waiting to be solved better, if anyone wants to take it on.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How to move 3 years of modules to my new XP box?
by dmizz (Novice) on Nov 26, 2008 at 22:00 UTC | |
by jand (Friar) on Nov 27, 2008 at 02:10 UTC | |
|
Re^4: How to move 3 years of modules to my new XP box?
by Anonymous Monk on Nov 27, 2008 at 03:00 UTC | |
by wol (Hermit) on Nov 27, 2008 at 14:05 UTC |