2

I am having an issue (Catalyst related) apparently with Moose/Class::MOP. Starting my server I get the following output... (shown below in all its glory)

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 8 The 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

I am new at Catalyst (and I do like it, I just want to successfully get it up and running). I have checked the latest versions of Moose and Class::MOP and they are up to date (as far as CPAN is concerned).

Hopefully someone familiar with Moose has seen this before. Any suggestions or a place to start checking would be appreciated.

Michelle B.

Community
  • 1
  • 1

2 Answers2

10

You're running an old version of Catalyst. This issue has been fixed in commit r13516 and is already available on CPAN as of version 5.80026 (5.80028 is latest and recommended).

Catalyst was using some deprecated feature of Moose, which just recently started warning.

rafl
  • 11,980
  • 2
  • 55
  • 77
  • THANK YOU rafl! I just needed to upgrade Catalyst. I know that was fairly obvious and I thank you. (as well as Eric and Ether) – Michelle Bobek Oct 05 '10 at 21:08
  • would you take a peek at my new reply. There are some version dependency issues in the current stuff and most of it seemed to have your name on the releases. Thank you! – Ashley Jan 20 '11 at 20:20
1

So, you're right, the current Cat stuff has a fairly broken dependency chain. You can see from the current pass/fail on the CPAN for 5.80030 that fails are much higher than normal.

There are several bumps depending on the state of your current modules/versions. This worked for me this morning (I'm not sure if it's overkill)-

cpanm -v namespace::clean
cpanm -v namespace::autoclean
cpanm -v B::Hooks::EndOfScope
cpanm -v Package::Stash
cpanm -v Class::MOP Moose MooseX::Types
cpanm -v MooseX::Role::WithOverloading::Meta::Role::Application

cpanm -v Catalyst Catalyst::Devel

And if you're using Config::General for your configuration, this is a good idea too:

cpanm -v Config::General

If you get those in and it won't start, just read the stack trace (backwards) looking for names or missing functions/methods. Anything you see as a problem, upgrade. It's a "stable" kit but it's a collection of moving targets and everything has to line up.

Ashley
  • 4,307
  • 2
  • 19
  • 28
  • There's an issue with some of the modules you mentioned, not with others. Those are caused by changes in Package::Stash. When you upgraded Package::Stash, its Makefile.PL has warned you about that and told you which module you need to upgrade. Also it installed a `package-stash-conflicts` program for you to check which modules you still need to upgrade in case you missed the Makefile.PL notice. – rafl Jan 21 '11 at 18:40
  • @rafl, thank you for the info (and the hard work, I do appreciate it!). I don't think having the average user jump through this kind of hoop is the right way to go about this though. I can do it but most wouldn't/couldn't. The FAIL rate for Cat tests on 5.80030 is > 12% right now while 5.80029 was < 1%. – Ashley Jan 21 '11 at 19:42
  • If you have alternative solutions on how to work around the lack of conflicts support in the CPAN toolchain, please tell us. – rafl Jan 22 '11 at 17:42
  • @rafl: Heheh. I know it can be a tarpit. I actually did not get a "package-stash-conflicts" installed; not sure why, could have been me. – Ashley Jan 22 '11 at 20:36
  • @rafl: Looks like the wedge in this case is the lack of version declaration for namespace::clean/namespace::autoclean in the Makefile.PL dependencies for MooseX::Role::WithOverloading. They're both zero now (in 0.09). I'm not positive what version fixes the breakage. Mine were 3 100ths back IIRC. Perhaps these would actually be better addressed in the Moose space(?). – Ashley Jan 22 '11 at 22:01