如何重新安装 cpan-autobundle
How do I re-install a cpan-autobundle
我目前正在使用备份,而不是备份整个磁盘,对我来说只备份系统配置会更有效率。因此,对于 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
并且是的文件存在,但是我如何在另一台主机上"re-install every module"使用它?
注意:在使用 requirement-files in pip 之后,我对此有一些先入之见,所以请多多包涵。
如果您使用文本编辑器或 perldoc
打开该捆绑文件,您将获得说明。
=head1 SYNOPSIS
perl -MCPAN -e 'install Bundle::Snapshot_2017_11_30_00'
我目前正在使用备份,而不是备份整个磁盘,对我来说只备份系统配置会更有效率。因此,对于 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
并且是的文件存在,但是我如何在另一台主机上"re-install every module"使用它?
注意:在使用 requirement-files in pip 之后,我对此有一些先入之见,所以请多多包涵。
如果您使用文本编辑器或 perldoc
打开该捆绑文件,您将获得说明。
=head1 SYNOPSIS perl -MCPAN -e 'install Bundle::Snapshot_2017_11_30_00'