Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I re-install a cpan-autobundle

Tags:

perl

cpan

I'm working with backups at the moment and instead of backing up the full disks it would be much more efficient for me just to backup the configuration of the system. So for the perl-section of things I would like to have a way to list installed modules and later reinstall those modules if needed.

I read How do I get a list of installed CPAN modules? about how to get the list and when reading perldoc -l install I found this:

You can also use "cpan"'s "-a" switch to create an autobundle file that "CPAN.pm" understands and can use to re-install every module:

$ cpan -a

So I run cpan -aand the last two rows of the output is:

Wrote bundle file
    /home/ulf/.cpan/Bundle/Snapshot_2017_11_30_01.pm

And yes the file exists, but how do I use it to "re-install every module" on another host?

Note: I my have some preconceptions about this after working with requirement-files in pip so please bear with me.

like image 975
UlfR Avatar asked Mar 07 '23 11:03

UlfR


1 Answers

If you open that bundle file with a text editor or perldoc, you'll get instructions.

=head1 SYNOPSIS

perl -MCPAN -e 'install Bundle::Snapshot_2017_11_30_00'
like image 145
simbabque Avatar answered Mar 16 '23 10:03

simbabque