安装 perl 模块:cpan shell vs rpm/deb [英] Installing perl module: cpan shell vs rpm/deb

查看:50
本文介绍了安装 perl 模块:cpan shell vs rpm/deb的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想知道 - 与通过包管理安装 perl 模块相比,从 cpan shell 安装 perl 模块有什么优势吗?除了偶尔可以更快地访问最新的模块版本?

I just wonder - are there any advantages to installing perl modules from the cpan shell compared to installing them by package management? Apart from occasionally having quicker access to the latest modules version?

推荐答案

嗯,这完全取决于模块的预期用途.

Well, it all depends on the intended use of the modules.

原生包管理有很多优点:

The native package management has many advantages:

  • Perl 模块将与您的系统完美集成,例如文件在正确的(依赖于系统的)位置,脚本添加到路径等
  • 自动升级和安全补丁.
  • 可能是关心您的维护者或维护者组模块(例如 Debian Perl 组).
  • 特定于发行版的错误可以在成为主流之前修复(可能具有或不具有特定于平台的知识).
  • 当部署到具有相同操作系统版本的机器时,您可以认为包依赖是理所当然的.

直接从 CPAN 安装时,您还有一些优势:

When installing directly from CPAN, you also have some advantages:

  • 您可以安装模块的最新版本.
  • 您可以安装模块的特定版本(旧版本或开发者版本).
  • 您可以微调模块的编译或安装参数.

现在,local::libperlbrew (howto) 使 CPAN 方式对开发人员来说更加有趣.local::lib 允许您在使用系统的 perl 二进制文件时拥有您的私有模块树和 perlbrew 可让您轻松创建自己的完整 Perl 安装(还有多个 Perl 版本)并行).

Nowadays, local::lib and perlbrew (howto) has made the CPAN way a lot more interesting for a developer. local::lib lets you have your private module tree while using the system's perl binary and perlbrew lets you easily create your own complete Perl installations (also several Perl releases in parallel).

两种方式都是有效的,如上所述,优势取决于预期用途.

Both ways are valid, and as said, the advantage depends on the intended usage.

这篇关于安装 perl 模块:cpan shell vs rpm/deb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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