好!长见识了! 在 2010年12月2日 下午1:05,Yubao Liu <[email protected]>写道:
> On Thu, 2 Dec 2010, xianfu Yi wrote: > > cpanp 比 cpan 新,个人感觉 cpanp 有些功能很贴心,但是不够稳定。 > > cpanm 的功能只有 cpanp 和 cpan 的部分,专注于安装这个环节。 > > 以前发在水木 Perl 的帖子,汇总一下: > > cpanp 比 cpan 强的地方: > > * h 命令输出好看些 > * f 命令列出所有版本 > * u 命令卸载模块! > > 缺点是比 cpan 慢很多(比 cpan 慢是因为默认用 ftp://ftp.cpan.org/ 做源。。。。) > > cpanp 的 s reconfigure 命令很烦,没有 cpan 的 o conf 简洁。 > 而且 cpanp 的那个 source backend 配置有问题,对 SQLite [y/N] > 选择 n 或者直接回车,都会导致 source backend 从 Memory 切换 > 成 SQLite,切完之后丫又不装 SQLite 的东西,导致启动 cpanp 报 > 一堆错。 > > cpanp 一个 bug,在一个 Perl 模块目录里(可能是根据 lib 和 bin > 两个目录认为是有 Perl 模块),i Some::Module 时会去安装此目录下的模块, > 发现没有 Makefile.PL 还给自动生成一个 Makefile.PL。。。。 > > > 再推荐些模块安装相关的 tip: > > $ cpan > cpan> o conf build_requires_install_policy yes > cpan> o conf prerequisites_policy follow > cpan> notest install XXX > 两个配置默认是 ask/yes 和 ask,这要是安装 Catalyst,会回车到手抽筋。 > > 推荐安装 local::lib,然后安装 App::cpanminus,再安装 pmtools,后者在 > cpan 和 cpanp 里都不能自动安装。 > > > 有高手能简单比较一下: >> cpan、cpanp、cpanm >> 之间的异同与优劣吗? >> >> >> 在 2010年12月2日 上午12:30,cnhack TNT <[email protected]>写道: >> cool! >> >> 2010/12/1 Fayland Lam <[email protected]> >> >> =for advent_year 2010 >> >> =for advent_day 1 >> >> =for advent_title cpanm >> >> =for advent_author Fayland Lam >> >> M<cpanm> 应该是 2010 年最值得推荐的模块之一。 >> >> 我们通常使用 M<cpan> 来安装所需要的模块,但是有时候你会觉得 cpan 很不好用。比如 >> >> * 你想快速安装一个模块,但是 cpan 很慢,它需要 update 它的 index 来知道最新的模块版本 >> >> * 比如你想在内存有限的情况下安装模块,比如 dreamhost 或 slicehost 的主机上,你经常会得到 out of >> memory! 错误。 >> >> * 比如你要在很多server安装模块,你不想回答任何问题,希望使用默认的选项来进行自动化安装。 >> >> * 如果你想知道这个模块安装的大致情况,而不需要整个屏幕的 debug 信息。 >> >> 那你需要的就是 cpanm。 >> >> 安装 cpanm 可以通过最原始的 cpan 来安装。比如 >> >> =begin pre >> >> $ cpan App::cpanminus >> >> =end pre >> >> 或者你可以通过 cpanm 来安装 App::cpanminus (cpan 不完整的时候非常有用) >> >> =begin pre >> >> $ curl -L http://cpanmin.us | perl - --sudo App::cpanminus >> >> =end pre >> >> 这种情况会变得非常有趣。 >> >> =begin pre >> >> $ curl -L http://cpanmin.us | perl - App::cpanminus >> % Total % Received % Xferd Average Speed Time Time Time >> Current >> Dload Upload Total Spent Left >> Speed >> 100 166k 100 166k 0 0 258k 0 --:--:-- --:--:-- >> --:--:-- 258k >> --> Working on App::cpanminus >> Fetching >> http://search.cpan.org/CPAN/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.1004.tar.gz >> ... OK >> Configuring App-cpanminus-1.1004 ... OK >> Building and testing App-cpanminus-1.1004 ... OK >> Successfully installed App-cpanminus-1.1004 >> >> =end pre >> >> Tatsuhiko Miyagawa 出品必属精品。我吹的再多都不及大家去试试。:) >> >> PS, 附上今年的其他 advent 链接: >> >> * A<http://perladvent.pm.org/2010/> >> >> * A<http://www.catalystframework.org/calendar/2010/> >> >> * A<http://advent.rjbs.manxome.org/2010/> >> >> * A<http://advent.perldancer.org/2010> >> >> * A<http://perl-users.jp/articles/advent-calendar/2010/> >> >> >> BTW, I lost my password to upload the HTML to >> http://perlchina.org/advent/ and I'll do that later. if people want >> to >> view HTML version, try >> http://fayland.github.com/advent.perlchina.org/2010/cpanm.htmlfirst. >> Thanks >> >> -- >> Fayland Lam // http://www.fayland.org/ >> >> -- >> 您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。 >> 要向此网上论坛发帖,请发送电子邮件至 [email protected]。 >> 要取消订阅此网上论坛,请发送电子邮件至 >> [email protected]<perlchina%[email protected]> >> 。 >> 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN访问此网上论坛。 >> >> >> -- >> 您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。 >> 要向此网上论坛发帖,请发送电子邮件至 [email protected]。 >> 要取消订阅此网上论坛,请发送电子邮件至 >> [email protected]<perlchina%[email protected]> >> 。 >> 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。 >> >> >> -- >> 您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。 >> 要向此网上论坛发帖,请发送电子邮件至 [email protected]。 >> 要取消订阅此网上论坛,请发送电子邮件至 >> [email protected]<perlchina%[email protected]> >> 。 >> 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。 >> >> >> > -- > 您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。 > 要向此网上论坛发帖,请发送电子邮件至 [email protected]。 > 要取消订阅此网上论坛,请发送电子邮件至 > [email protected]<perlchina%[email protected]> > 。 > 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。 > > -- 您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。 要向此网上论坛发帖,请发送电子邮件至 [email protected]。 要取消订阅此网上论坛,请发送电子邮件至 [email protected]。 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
