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

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

问题描述

A 最近的问题 这里有我在想.

在我尝试过的大多数 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天全站免登陆