我目前正在使用备份,而不是备份完整的磁盘,对我来说只备份系统的配置会更有效率。因此,对于 perl 部分,我希望有一种方法可以列出已安装的模块,然后在需要时重新安装这些模块。
我读了How do I get a list of installed CPAN modules?关于如何获取列表以及阅读时 perldoc -l install
我找到了这个:
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
输出的最后两行是:Wrote bundle file
/home/ulf/.cpan/Bundle/Snapshot_2017_11_30_01.pm
和是的该文件存在,但我如何使用它在另一台主机上“重新安装每个模块”?
注意:在使用 requirement-files in pip 之后,我对此有一些先入之见。所以请多多包涵。
最佳答案
如果您使用文本编辑器或 perldoc
打开该捆绑文件,你会得到指示。
=head1 SYNOPSIS perl -MCPAN -e 'install Bundle::Snapshot_2017_11_30_00'
关于perl - 如何重新安装 cpan-autobundle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47573728/