How do I re-install a cpan-autobundle

♀尐吖头ヾ 提交于 2019-12-24 02:16:32

问题


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.


回答1:


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'


来源:https://stackoverflow.com/questions/47573728/how-do-i-re-install-a-cpan-autobundle

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!