如何安装一组特定版本的 Perl 模块? [英] How can I install a specific version of a set of Perl modules?

查看:54
本文介绍了如何安装一组特定版本的 Perl 模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的任务是复制生产环境以创建许多测试/坐下环境.

I'm tasked with replicating a production environment to create many test/sit environments.

我需要做的一件事是使用多年来安装的所有模块(包括内部和外部模块)构建 Perl.我可以只使用 CPAN.pm autobundle,但这会导致测试环境中的外部模块版本比生产环境中的要更新很多.

One of the things I need to do is build up Perl, with all the modules which have been installed (including internal and external modules) over the years. I could just use CPAN.pm autobundle, but this will result in the test environment having much newer versions of the external modules that production has.

获取和安装(大量)特定于版本的 Perl 模块的最简单/最好的方法是什么.

What is the easiest/best way to get and install (a lot of) version specific Perl modules.

推荐答案

根据您的需要制作您自己的 CPAN 镜像.Stratopan.com、一项服务和 Pinto 是建立在其之上的工具,可以帮助您做到这一点.

Make your own CPAN mirror with exactly what you want. Stratopan.com, a service, and Pinto, tools that's built on top of, can help you do that.

CPAN 工具只安装任何发行版的最新版本,因为 PAUSE 只索引最新版本.但是,您可以创建自己的私有 CPAN,该 CPAN 完全具有您想要的发行版.一旦您拥有自己的 CPAN 镜像,并且只包含您想要的内容,您就可以将 CPAN 工具指向该镜像,以便它只安装那些版本.稍后详细介绍.

The CPAN tools only install the latest version of any distribution because PAUSE only indexes the latest version. However, you can create your own, private CPAN that has exactly the distributions that you want. Once you have your own CPAN mirror with only what you want, you point your CPAN tools at only that mirror so it only installs those versions. More on that in a minute.

现在,您希望拥有多个版本.您可以根据需要创建任意数量的镜像,也可以将镜像置于源代码管理中,以便您可以查看您喜欢的任何版本的镜像.

Now, you want to have several versions of that. You can create as many mirrors as you like, and you can also put the mirrors in source control so you can check out any version of the mirror that you like.

诸如 CPAN::Mini::Inject 之类的工具可以帮助您设置自己的 CPAN.查看 我在 Slideshare 上的演讲 了解基本示例,以及一些 我在 Vimeo 上的视频 用于一些演示.查看标题中包含CPAN"或BackPAN"的任何内容.我想我可能在 The Perl Review 中也有一些关于它的内容,或者应该在下一期.:)

Tools such as CPAN::Mini::Inject can help you set up your own CPAN. Check out my talks on Slideshare for the basic examples, and some of my videos on Vimeo for some of the demonstrations. Look at anything that has "CPAN" or "BackPAN" in the title. I think I might have some stuff about it in The Perl Review too, or should by the next issue. :)

最近,我一直在开发一个名为 dpan(用于 DarkPAN)的程序,它可以查看随机目录,在其中找到 Perl 发行版,并创建您需要的结构和索引文件.你运行 dpan,你会得到一个 URL 来指向你的 CPAN 客户端,然后你就可以开始了.它是我的 MyCPAN-Indexer 项目的一部分,位于 Github 中.它尚未准备好供无人监督的公共使用,因为我主要与企业客户合作来定制他们的设置.如果您对此感兴趣,请随时向我提问.

Lately, I've been working on a program called dpan (for DarkPAN) that can look at random directories, find Perl distributions in them, and create the structure and index files that you need. You run dpan, you get a URL to point your CPAN client toward, and off you go. It's part of my MyCPAN-Indexer project, which is in Github. It's not quite ready for unsupervised public use because I mostly work with corporate clients to customize their setup. If you're interested in that, feel free to ask me questions though.

此外,我最近发布了 CPAN::PackageDetails 可以帮助您构建正确的索引文件.它也还很年轻,但同样,如果您需要一些特别的东西,尽管问.

Also, I recently released CPAN::PackageDetails that can help you build the right index file. It's still a bit young too, but again, if you need something special, just ask.

这篇关于如何安装一组特定版本的 Perl 模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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