为什么CPAN.pm在我只想要Mo的时候安装Moose?

时间:2016-02-24 00:42:47

标签: perl cpan metacpan

我需要在perl5脚本中使用轻量级对象系统。在阅读 Mouse.pm Moo.pm Mo.pm 的文档后,我在Moo和Mo之间折腾。决定因素最后,Mo模块有no dependencies(参见页面右侧 - “DEPENDENCIES”是灰色的)。

所以,我继续我认为简单的安装:

User@Ubuntu-iMac:~$ perl -MCPAN -e shell
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v2.05)
Enter 'h' for help.

cpan[1]> Terminal does not support GetHistory.
Lockfile removed.
User@Ubuntu-iMac:~$ sudo perl -MCPAN -e shell
[sudo] password for User: 
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v2.05)
Enter 'h' for help.

cpan[1]> install Mo
Reading '/home/User/.cpan/Metadata'
  Database was generated on Tue, 23 Feb 2016 02:17:02 GMT
Running install for module 'Mo'
Fetching with LWP:
http://www.cpan.org/authors/id/I/IN/INGY/Mo-0.39.tar.gz
Checksum for /home/User/.cpan/sources/authors/id/I/IN/INGY/Mo-0.39.tar.gz ok
Scanning cache /home/User/.cpan/build for sizes
............................................................................DONE
Configuring I/IN/INGY/Mo-0.39.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Mo
Writing MYMETA.yml and MYMETA.json
  INGY/Mo-0.39.tar.gz
  /usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for I/IN/INGY/Mo-0.39.tar.gz
---- Unsatisfied dependencies detected during ----
----            INGY/Mo-0.39.tar.gz           ----
    Moose [requires,optional]
    IO::All [requires,optional]
    Mouse [requires,optional]

 ... many lines of installation of dozens of modules deleted ...

所以我的问题是 - 为什么它认为它需要MouseIO::All,而且最痛苦的是Moose?注意我可以看到[需要,可选] - 但我认为这两个术语是矛盾的。

0 个答案:

没有答案