Reinstalling all modules on another perl

David Precious davidp at preshweb.co.uk
Thu Apr 28 11:49:19 BST 2011


On Thursday 28 April 2011 08:02:08 Mark Fowler wrote:
> This will require me to reinstall all my modules. Now, I could do this
> by writing some code to parse perllocal.pod and then using cpanm, but
> I'm feeling lazy this morning (I haven't had tea yet, and hey, it's a
> virtue) so I wondered if anyone else on the list already had some
> magic invocation that works

CPAN.pm's autobundle feature will be your friend here.

perl -MCPAN -e autobundle

... you'll end up with a bundle file written containing all installed modules, 
for instance:

Wrote bundle file
    /home/davidp/.cpan/Bundle/Snapshot_2011_04_28_00.pm

You can then install that bundle on the other box, and job done.

Cheers

Dave P

-- 
David Precious  ("bigpresh")
http://www.preshweb.co.uk/

   "Programming is like sex. One mistake and you have to support
   it for the rest of your life". (Michael Sinz)


More information about the london.pm mailing list