如何使用CPANPLUS自动捆绑更新Perl的新版本? [英] How to use a CPANPLUS autobundle to update a new version of Perl?

查看:65
本文介绍了如何使用CPANPLUS自动捆绑更新Perl的新版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Perl 5.13.4,其中包含大量已安装的CPAN模块。

I have Perl 5.13.4 with a large collection of installed CPAN modules.

我刚刚编译了Perl 5.14.0。我想将5.13.4中的所有模块安装(重新编译)到5.14.0中。

I have just compiled Perl 5.14.0. I'd like to install (recompile) all the modules in 5.13.4 into 5.14.0.

我可以/已经用'cpanp生成了一堆已安装的模块'和'b'选项;我现在有一个文件〜/ .cpanplus / 5.13.4 / dist / autobundle / Snapshot_2011_05_18_00.pm

I can/have generated a bundle of the installed modules with 'cpanp' and the 'b' option; I now have a file ~/.cpanplus/5.13.4/dist/autobundle/Snapshot_2011_05_18_00.pm.


  • 在5.14.0版本的 cpanp中使用什么命令,该命令将通过该快照捆绑包并确保5.14.0已安装所有这些模块?

  • What is the command to use in the 5.14.0 version of 'cpanp' that will go through that snapshot bundle and ensure 5.14.0 has all those modules installed?

或者,如果cpanp和bundle的组合不是合适的方法,那么复制(重新编译)旧版Perl中安装的模块的最简单方法是什么?新版本的Perl? (如果CPAN可以处理捆绑文件,我将使用它-这是我关心的结果,而不是实现它的机制。)

Or, if the combination of cpanp and a bundle isn't the appropriate way to go, what is the easiest way to replicate (recompile) the modules installed in the old version of Perl for the new version of Perl? (If CPAN can deal with the bundle file, I'll use it - it is the result I care about, not the mechanism used to achieve it.)

我确实在此处快速查找了有关 perl cpanplus软件包的问题列表,但没有找到我想要的信息。我也查看了 perldoc cpanp'多次,但找不到我要的信息。这与说信息不存在不同;这可能只是意味着我没有发现它。

推荐答案

捆绑文件是CPAN特例化的东西,令我惊讶的是,它在CPANPLUS中也不起作用。这就是为什么没有人谈论CPANPLUS捆绑包,而您找不到任何东西的原因。因此,请使用CPAN。首先找出您的CPAN根目录,默认为〜/ .cpan 〜/ .local / share / .cpan 在兼容Free Desktop XDG的系统上。

A bundle file is a CPAN special-cased thing that - to my surprise - does not happen to also work in CPANPLUS. That's why no one talks of CPANPLUS bundles and you couldn't find anything. So employ CPAN. First find out where your CPAN root is, by default it's ~/.cpan or ~/.local/share/.cpan on a Free Desktop XDG-compliant system. Alter the instructions accordingly.

mkdir -p ~/.cpan/Bundle
mv ~/.cpanplus/5.13.4/dist/autobundle/Snapshot_2011_05_18_00.pm ~/.cpan/Bundle
cpan Bundle::Snapshot_2011_05_18_00   # DTRT

在您谈论重新编译时,CPAN拥有该命令,您可以从CPAN Shell或以通过命令行进行API调用,但这仅在跨Perl版本的固定位置具有模块时才有用。

As you were talking about recompile, CPAN has that command and you can issue it from either the CPAN shell or as API call from the command-line, but it's useful only if you have modules at a fixed location across versions of Perl.

这篇关于如何使用CPANPLUS自动捆绑更新Perl的新版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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