gpt4 book ai didi

perl - 为什么我在启动 Catalyst 时收到许多 Moose 警告?

转载 作者:行者123 更新时间:2023-12-01 00:21:36 25 4
gpt4 key购买 nike

我有一个问题(与 Ca​​talyst 相关)显然与 Moose/Class::MOP 有关。启动我的服务器,我得到以下输出...(如下所示)

The alias and excludes options for role application have been renamed -alias and -excludes at /usr/local/lib/perl/5.10.1/Moose/Meta/Role/Application.pm line 26 Moose::Meta::Role::Application::new('Moose::Meta::Role::Application::ToRole', 'excludes', 'ARRAY(0x9645568)') called at /usr/local/lib/perl/5.10.1/Moose/Meta/Role.pm line 416 Moose::Meta::Role::apply('Moose::Meta::Role=HASH(0x95b3368)', 'Moose::Meta::Role=HASH(0x9446d90)', 'excludes', 'ARRAY(0x9645568)') called at /usr/local/lib/perl/5.10.1/Moose/Util.pm line 133 Moose::Util::_apply_all_roles('Moose::Meta::Role=HASH(0x9446d90)', undef, 'MooseX::Getopt', 'HASH(0x9454a08)') called at /usr/local/lib/perl/5.10.1/Moose/Util.pm line 87 Moose::Util::apply_all_roles('Moose::Meta::Role=HASH(0x9446d90)', 'MooseX::Getopt', 'HASH(0x9454a08)') called at /usr/local/lib/perl/5.10.1/Moose/Role.pm line 26 Moose::Role::with('Moose::Meta::Role=HASH(0x9446d90)', 'MooseX::Getopt', 'HASH(0x9454a08)') called at /usr/local/lib/perl/5.10.1/Moose/Exporter.pm line 294 Moose::Role::with('MooseX::Getopt', 'HASH(0x9454a08)') called at /usr/share/perl5/Catalyst/ScriptRole.pm line 8 require Catalyst/ScriptRole.pm called at /usr/local/lib/perl/5.10.1/Class/MOP.pm line 113 Class::MOP::__ANON__() called at /usr/share/perl5/Try/Tiny.pm line 71 eval {...} called at /usr/share/perl5/Try/Tiny.pm line 67 Try::Tiny::try('CODE(0x93c2910)', 'Try::Tiny::Catch=REF(0x93bba38)') called at /usr/local/lib/perl/5.10.1/Class/MOP.pm line 124 Class::MOP::load_first_existing_class('Catalyst::ScriptRole') called at /usr/local/lib/perl/5.10.1/Class/MOP.pm line 136 Class::MOP::load_class('Catalyst::ScriptRole', undef) called at /usr/local/lib/perl/5.10.1/Moose/Util.pm line 109 Moose::Util::_apply_all_roles('Moose::Meta::Class=HASH(0x8fc9378)', undef, 'Catalyst::ScriptRole') called at /usr/local/lib/perl/5.10.1/Moose/Util.pm line 87 Moose::Util::apply_all_roles('Moose::Meta::Class=HASH(0x8fc9378)', 'Catalyst::ScriptRole') called at /usr/local/lib/perl/5.10.1/Moose.pm line 58 Moose::with('Moose::Meta::Class=HASH(0x8fc9378)', 'Catalyst::ScriptRole') called at /usr/local/lib/perl/5.10.1/Moose/Exporter.pm line 294 Moose::with('Catalyst::ScriptRole') called at /usr/share/perl5/Catalyst/Script/Server.pm line 14 require Catalyst/Script/Server.pm called at /usr/local/lib/perl/5.10.1/Class/MOP.pm line 113 Class::MOP::__ANON__() called at /usr/share/perl5/Try/Tiny.pm line 71 eval {...} called at /usr/share/perl5/Try/Tiny.pm line 67 Try::Tiny::try('CODE(0x8f6dc38)', 'Try::Tiny::Catch=REF(0x8f8d1c8)') called at /usr/local/lib/perl/5.10.1/Class/MOP.pm line 124 Class::MOP::load_first_existing_class('Catalyst::Script::Server') called at /usr/local/lib/perl/5.10.1/Class/MOP.pm line 136 Class::MOP::load_class('Catalyst::Script::Server') called at /usr/share/perl5/Catalyst/ScriptRunner.pm line 18 Catalyst::ScriptRunner::run('Catalyst::ScriptRunner', 'Jamaica', 'Server') called at script/boca_server.pl line 8The old Moose::Util::MetaRole API (before version 0.94) has been deprecated at /usr/local/lib/perl/5.10.1/Moose/Util/MetaRole.pm line 16 Moose::Util::MetaRole::apply_metaclass_roles('for_class', 'Catalyst::Controller', 'metaclass_roles', 'ARRAY(0x97bdff8)', 'method_metaclass_roles', 'ARRAY(0x97ab9f0)', 'wrapped_method_metaclass_roles', 'ARRAY(0x981d650)') called at /usr/share/perl5/MooseX/MethodAttributes.pm line 32 MooseX::MethodAttributes::init_meta('MooseX::MethodAttributes', 'for_class', 'Catalyst::Controller', 'metaclass', undef) called at /usr/local/lib/perl/5.10.1/Moose/Exporter.pm line 355 Moose::Exporter::__ANON__('MooseX::MethodAttributes') called at /usr/share/perl5/Catalyst/Controller.pm line 10 Catalyst::Controller::BEGIN() called at /usr/share/perl5/Catalyst/Controller.pm line 10 eval {...} called at /usr/share/perl5/Catalyst/Controller.pm line 10 require Catalyst/Controller.pm called at /usr/share/perl5/Catalyst.pm line 16 Catalyst::BEGIN() called at /usr/share/perl5/Catalyst/Controller.pm line 10 eval {...} called at /usr/share/perl5/Catalyst/Controller.pm line 10 require Catalyst.pm called at /home/bobek/dev/build_7.2/mvc/Jamaica/script/../lib/Jamaica.pm line 17 Jamaica::BEGIN() called at /usr/share/perl5/Catalyst/Controller.pm line 10 eval {...} called at /usr/share/perl5/Catalyst/Controller.pm line 10 require Jamaica.pm called at /usr/local/lib/perl/5.10.1/Class/MOP.pm line 113 Class::MOP::__ANON__() called at /usr/share/perl5/Try/Tiny.pm line 71 eval {...} called at /usr/share/perl5/Try/Tiny.pm line 67 Try::Tiny::try('CODE(0x8fb3230)', 'Try::Tiny::Catch=REF(0x969fee0)') called at /usr/local/lib/perl/5.10.1/Class/MOP.pm line 124 Class::MOP::load_first_existing_class('Jamaica') called at /usr/local/lib/perl/5.10.1/Class/MOP.pm line 136 Class::MOP::load_class('Jamaica') called at /usr/share/perl5/Catalyst/ScriptRole.pm line 61 Catalyst::ScriptRole::_run_application('Catalyst::Script::Server=HASH(0x969d748)') called at /usr/share/perl5/Catalyst/Script/Server.pm line 181 Catalyst::Script::Server::run('Catalyst::Script::Server=HASH(0x969d748)') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 48 Class::MOP::Method::Wrapped::__ANON__('Catalyst::Script::Server=HASH(0x969d748)') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 89 Catalyst::Script::Server::run('Catalyst::Script::Server=HASH(0x969d748)') called at /usr/share/perl5/Catalyst/ScriptRunner.pm line 20 Catalyst::ScriptRunner::run('Catalyst::ScriptRunner', 'Jamaica', 'Server') called at script/boca_server.pl line 8

我是 Catalyst 的新手(我确实喜欢它,我只想成功地启动并运行它)。我检查了最新版本的 Moose 和 Class::MOP,它们是最新的(就 CPAN 而言)。

希望熟悉 Moose 的人以前见过这个。任何建议或开始检查的地方将不胜感激。

米歇尔 B.

最佳答案

您正在运行旧版本的 Catalyst。此问题已在提交 r13516 中修复并且从版本 5.80026 开始已经在 CPAN 上可用(5.80028 是最新的,推荐使用)。

Catalyst 使用了 Moose 的一些已弃用的功能,最近才开始发出警告。

关于perl - 为什么我在启动 Catalyst 时收到许多 Moose 警告?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3867415/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com