1

我正在尝试让Chart Clicker在 Perl 中工作。我已经下载了示例pie.pl。我已经通过正确安装所有模块来配置所有内容。但是每当我尝试运行pie.pl example. 我得到以下异常。谁能建议我为什么会发生这种情况,我该如何克服?

C:\Perl64\site>perl pie.pl
Subroutine share_axes_with redefined at lib/Chart/Clicker/Context.pm line 120.
The 'add_attribute' method cannot be called on an immutable instance at C:/Perl64/site/lib/Class/MOP/Class/Immutable/Trait.pm line 32.
        Class::MOP::Class::Immutable::Trait::_immutable_cannot_call('add_attribute') called at C:/Perl64/site/lib/Class/MOP/Class/Immutable/Trait.pm l
ine 47
        Class::MOP::Class:::around('CODE(0x35683d8)', 'Class::MOP::Class::Immutable::Moose::Meta::Class=HASH(0x5833518)', 'domain_axis', 'default', 'C
ODE(0x3dd85d0)', 'is', 'rw', 'isa', 'Chart::Clicker::Axis', ...) called at C:/Perl64/site/lib/Class/MOP/Method/Wrapped.pm line 162
        Class::MOP::Method::Wrapped::__ANON__('Class::MOP::Class::Immutable::Moose::Meta::Class=HASH(0x5833518)', 'domain_axis', 'default', 'CODE(0x3d
d85d0)', 'is', 'rw', 'isa', 'Chart::Clicker::Axis', 'definition_context', ...) called at C:/Perl64/site/lib/Class/MOP/Method/Wrapped.pm line 91
        Class::MOP::Class::Immutable::Moose::Meta::Class::add_attribute('Class::MOP::Class::Immutable::Moose::Meta::Class=HASH(0x5833518)', 'domain_ax
is', 'default', 'CODE(0x3dd85d0)', 'is', 'rw', 'isa', 'Chart::Clicker::Axis', 'definition_context', ...) called at C:/Perl64/site/lib/Moose.pm line 79

        Moose::has('Class::MOP::Class::Immutable::Moose::Meta::Class=HASH(0x5833518)', 'domain_axis', 'is', 'rw', 'isa', 'Chart::Clicker::Axis', 'defa
ult', 'CODE(0x3dd85d0)') called at C:/Perl64/site/lib/Moose/Exporter.pm line 382
        Moose::has('domain_axis', 'is', 'rw', 'isa', 'Chart::Clicker::Axis', 'default', 'CODE(0x3dd85d0)') called at lib/Chart/Clicker/Context.pm line
 41
        require lib/Chart/Clicker/Context.pm called at pie.pl line 5
        main::BEGIN() called at lib/Chart/Clicker/Context.pm line 0
        eval {...} called at lib/Chart/Clicker/Context.pm line 0
Compilation failed in require at pie.pl line 5.
BEGIN failed--compilation aborted at pie.pl line 5.

如果有人需要任何文件的更多信息。请告诉我,我会上传那个文件。

4

1 回答 1

1

我猜你需要运行moose-outdated这是Moose附带的脚本,运行它会生成与您安装的 Moose 版本不兼容的模块列表(如果有)。升级这些模块。

于 2012-08-03T03:35:55.103 回答