使用软件包管理器时如何管理Perl模块? [英] How do YOU manage Perl modules when using a package manager?

查看:120
本文介绍了使用软件包管理器时如何管理Perl模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个关于这里的最近的问题我在想.

A recent question here on SO got me thinking.

在我尝试过的大多数Linux发行版中,某些Perl模块将通过程序包管理器提供.其他人当然不会.在相当长的一段时间里,只要需要安装一些CPAN模块来查找某个软件包是否可用并在安装该软件包时就安装它,就可以使用我的软件包管理器.

On most Linux distributions that I tried, some Perl modules would be available through the package manager. Others, of course, not. For quite a while I would use my package manager whenever I needed to install some CPAN module to find out whether a package was available or not and to install it when it was.

明显的优势是,只要有新版本的软件包可用,您就可以更新模块.

The obvious advantage is that you get your modules updated whenever a new version of the package becomes available.

但是,当该模块无法以预打包的形式提供并且存在该模块的依赖项时,您会遇到麻烦.每次cpan shell询问是否应遵循依赖项时,都要启动软件包管理器,这很累人.

However, you get in trouble when the module is not available in pre-packaged form and there are dependencies for that module that are. Firing up your package manager every time the cpan shell asks whether it should follow a dependency can be quite tiring.

通常,另一个缺点是预包装模块的版本.如果您正在运行Debian或Ubuntu,那么您很快就会发现自己将无法像许多CPAN模块作者一样生活在最前沿.

Often, another drawback is the version of the pre-packaged module. If you are running Debian or Ubuntu you will soon find out that you will not be able to live on the bleeding edge, like many CPAN module authors seem to do.

Linux上的其他Perl人员如何处理该问题?您只是忽略包裹经理提供的服务吗?是否有任何工具可以使apt和cpan变得更好(例如)?还是您根本不通过cpan shell安装任何东西?

How do other Perl people on Linux handle that problem? Do you just ignore what your package managers have to offer? Are there any tools that make apt (for example) and cpan better team mates? Or do you simply not install anything via the cpan shell?

推荐答案

由于最初提出此问题,所以 perlbrew 已发布.它使安装自定义,自包含的perl安装变得很简单.在这些版本之间切换同样容易:

Since this question was originally asked, perlbrew has been released. It makes installing custom, self-contained perl installs trivial. And switching between those versions is just as easy:

perlbrew switch $version

这篇关于使用软件包管理器时如何管理Perl模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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