cpan cpanp cpanm

CPAN是Perl的软件收藏库,提供大量Perl模块的下载、安装和管理。本文介绍了如何使用cpan、cpanm、cpanp等工具安装和查找CPAN上的模块,特别提到了cpanm的无依赖性和便捷性,以及local::lib和CPANPLUS提供的额外选项。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

CPANComprehensive Perl Archive Network)

中文译为:“Perl综合典藏网”,“Perl综合档案网”或者“Perl程序库”。


它包含了极多用Perl写成的软体和其文件。

CPAN是它是一个巨大的Perl软件收藏库,收集了大量有用的Perl模块(modules)及其相关的文件。


CPAN亦是一支Perl程式的名字,其作用是让使用者容易从CPAN下载、安装、更新及管理其他在CPAN上的Perl程式。


CPAN的成功引来很多其他程式语言社群的模仿。



相关:

1 当你不知道怎么有cpan这个东西的时候,那你肯定不会去关于它的东西。

2 当你偶尔看到:某某处有某些东西或者某些模块需要cpan安装的时候,你也许有点好奇:cpan是个什么东西,好了,你search后就可能知道它的确是个玩意了。

3 虽然你知道了什么是cpan了,但是却不知道怎么使用它安装东西的时候,你可以各种搜索,希望你能搜到:

如果安装一个模块(

How to install modules 

),

如何知道它能不能安装一个模块(也就是说:它那儿到底有没有这个模块(

How to find modules 

)),这些东东网上都是有的,希望你能搜索到哦。


cpanm fromApp::cpanminus is a script to get, unpack, build and install modules from CPAN. It's dependency free (can bootstrap itself) and requires zero configuration (install instructions). 

local::lib enables you to install modules into a specified directory, without requiring root or administrator access. 

cpan fromCPAN has been distributed with Perl since 1997 (5.004). It has many more options thancpanm, it is also much more verbose. 

cpanp fromCPANPLUS has been distributed with Perl since 2007 (5.009). This offers even more options thancpanm or cpan


提示:

如何安装cpanm:直接在linux Terminal中输入cpanm看会不会出什么提示,还好,它真出提示了。

wayne@ubuntu:~/Downloads/lxr-1.2.0$ cpanm
The program 'cpanm' is currently not installed.  You can install it by typing:

sudo apt-get install cpanminus
wayne@ubuntu:~/Downloads/lxr-1.2.0$

没准安装其它玩意也会有这提示哦,脑子灵活点吧。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值