本文介绍了如何重新安装cpan-autobundle的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我正在使用备份,而不是备份完整的磁盘,仅备份系统的配置对我来说会更有效率。因此,对于Perl部分,我希望有一种方法来列出已安装的模块,然后在需要时重新安装这些模块。

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.

我阅读了有关如何获取该列表以及阅读 perldoc -l install时的信息我发现:

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:

$ cpan -a


所以我运行 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?

注意:我对此事有一些成见r使用,所以请多多包涵。

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

推荐答案

如果使用文本编辑器或 perldoc ,您会得到说明。

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'


这篇关于如何重新安装cpan-autobundle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 16:57