Taken from my post here, you can use bundles to gather all CPAN distributions installed, and then re-install them into your new perl installation:
cpan -a
...
Wrote bundle file
/home/steve/.cpan/Bundle/Snapshot_2018_01_12_00.pm
# move the Snapshot pm file to your ".cpan/Bundle" dir
# switch to the new perl you want to install the distributions into
cpan Bundle::Snapshot_2018_01_12_00.pm
That example is on Linux, but it should be easy enough to follow.
Note that I'm the author of berrybrew, and having the ability to 'clone' installed distributions from one perl instance into another is on my roadmap for this spring. | [reply] [d/l] |
Hello. stevieb has "clone modules" in his TODO list, but I haven't seen any commits yet that indicate he's working on it. He's had a rather eventful life recently, and berrybrew isn't his primary focus: I don't blame him. In the past, I've added some small stuff to berrybrew, but I'm not even sure what all would be required to implement "clone modules", let alone how I'd go about it, so I unfortunately won't be able to help move this one forward.
As a suggestion for how to improve upon "doing it manually", making a Bundle:: "module" helps. Hmm, mine's in a private svn repo, not in my github. Basically, all you need is a Makefile.PL that lists the prerequisites, and a dummy .pm, and you can then run cpanm --installdeps . (assuming you're in the right directory, and use cpanm; you can use the traditional perl Makefile.PL; make; make install sequence as an alternative). A simplified version of my Makefile.PL is below:
edit: as a publically-available example, some users keep their bundle's on CPAN, such as Bundle::BDFOY, so you can see how someone much more experienced than I does it. (but I wouldn't recommend putting yours in CPAN, unless you've got a following, or think other people would actually be interested in your bundle.)
| [reply] [d/l] [select] |
"In the past, I've added some small stuff to berrybrew..."
Your efforts go well above and beyond "some small stuff". You single-handedly put in the entire berrybrew use ... functionality (which I use very often), as well as revamped the entire test infrastructure to make it far more dynamic (and usable).
My development of berrybrew became a lot more efficient after these significant pieces were added.
Thanks again :)
| [reply] [d/l] [select] |