1

我想玩XML::Rabbit,但是即使使用最简单的代码我也遇到了问题。我设法将它剥离成一行。

在一个简单的文件中,我使用

use Class::Load;

进而:

perl test_optlist.pl

Can't locate Data/OptList.pm in @INC (you may need to install the Data::OptList module) (@INC contains: [CUT]) at /home/szymon/perl5/lib/perl5/Class/Load.pm line 8.
BEGIN failed--compilation aborted at /home/szymon/perl5/lib/perl5/Class/Load.pm line 8.
Compilation failed in require at test_optlist.pl line 2.
BEGIN failed--compilation aborted at test_optlist.pl line 2.

所以让我们安装它:

$ cpanm Data::OptList
Data::OptList is up to date. (0.107)

Perl 版本:

This is perl 5, version 17, subversion 8 (v5.17.8) built for x86_64-linux

哪里有问题?

4

1 回答 1

2

您肯定在使用另一个perl. cpanm

perlbrew install-cpanm

要安装cpanmunder perlbrew's control 的版本,请确保这个新版本cpanm是在路径中首先找到的版本(尽管我怀疑它会是),然后再试一次

于 2013-01-25T12:12:13.577 回答