试图在debian 6上安装perl的Catalyst框架。 - 不能将未定义的值用作HASH

时间:2011-05-17 13:30:54

标签: perl install catalyst

[14:27: /mnt/mydocuments/git_working_dir/cat_example$] catalyst.pl hello_world
Couldn't load class (Catalyst::Exception::Basic) because: Can't use an undefined value as a HASH reference at /usr/lib/perl5/MooseX/Role/WithOverloading/Meta/Role/Application.pm line 45.
Compilation failed in require at /usr/local/lib/perl/5.10.1/Class/MOP.pm line 117.
 at /usr/local/lib/perl/5.10.1/Class/MOP.pm line 123
    Class::MOP::__ANON__('Can\'t use an undefined value as a HASH reference at /usr/lib...') called at /usr/local/share/perl/5.10.1/Try/Tiny.pm line 100
    Try::Tiny::try('CODE(0x29021c8)', 'Try::Tiny::Catch=REF(0x28fca88)') called at /usr/local/lib/perl/5.10.1/Class/MOP.pm line 128
    Class::MOP::load_first_existing_class('Catalyst::Exception::Basic') called at /usr/local/lib/perl/5.10.1/Class/MOP.pm line 140
    Class::MOP::load_class('Catalyst::Exception::Basic', undef) called at /usr/local/lib/perl/5.10.1/Moose/Util.pm line 126
    Moose::Util::_apply_all_roles('Moose::Meta::Class=HASH(0x2b63fe0)', undef, 'Catalyst::Exception::Basic') called at /usr/local/lib/perl/5.10.1/Moose/Util.pm line 93
    Moose::Util::apply_all_roles('Moose::Meta::Class=HASH(0x2b63fe0)', 'Catalyst::Exception::Basic') called at /usr/local/lib/perl/5.10.1/Moose.pm line 60
    Moose::with('Moose::Meta::Class=HASH(0x2b63fe0)', 'Catalyst::Exception::Basic') called at /usr/local/lib/perl/5.10.1/Moose/Exporter.pm line 356
    Moose::with('Catalyst::Exception::Basic') called at /usr/share/perl5/Catalyst/Exception.pm line 50
    require Catalyst/Exception.pm called at /usr/share/perl5/Catalyst/Utils.pm line 4
    Catalyst::Utils::BEGIN() called at /usr/share/perl5/Catalyst/Exception.pm line 0
    eval {...} called at /usr/share/perl5/Catalyst/Exception.pm line 0
    require Catalyst/Utils.pm called at /usr/share/perl5/Catalyst/Helper.pm line 12
    Catalyst::Helper::BEGIN() called at /usr/share/perl5/Catalyst/Exception.pm line 0
    eval {...} called at /usr/share/perl5/Catalyst/Exception.pm line 0
    require Catalyst/Helper.pm called at /usr/bin/catalyst.pl line 26
    main::BEGIN() called at /usr/share/perl5/Catalyst/Exception.pm line 0
    eval {...} called at /usr/share/perl5/Catalyst/Exception.pm line 0
Compilation failed in require at /usr/share/perl5/Catalyst/Utils.pm line 4.
BEGIN failed--compilation aborted at /usr/share/perl5/Catalyst/Utils.pm line 4.
Compilation failed in require at /usr/share/perl5/Catalyst/Helper.pm line 12.
BEGIN failed--compilation aborted at /usr/share/perl5/Catalyst/Helper.pm line 12.
Compilation failed in require at /usr/bin/catalyst.pl line 26.
BEGIN failed--compilation aborted at /usr/bin/catalyst.pl line 26.
[14:27: /mnt/mydocuments/git_working_dir/cat_example$] 

2 个答案:

答案 0 :(得分:1)

以root身份

cpan Catalyst::Runtime
cpan Package::Stash

答案 1 :(得分:1)

您没有描述,您是如何尝试安装的?

有很多方法,我想坚持使用包管理器,所以只是:

sudo apt-get install libcatalyst-perl

更新: 你的问题当然是混合使用CPAN和Debian软件包。你必须摆脱一个,然后让它运转起来。