如何重新安装cpan-autobundle [英] How do I re-install a cpan-autobundle

查看:87
本文介绍了如何重新安装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.

我阅读了如何获取已安装的CPAN模块的列表?有关如何获取该列表以及阅读 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.pm理解的
可以用来重新安装每个模块:

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


所以我运行 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使用 pip中的需求文件,所以请多多包涵。

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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆