FAQ
Hi -

I'm using CatalystX::Declare in my Controller. All was well until I tried
to define a method with named parameters:

method repository( :$ctx, :$action, :$master_image_id ) {
....
}

Now I'm getting a compilation error:

Couldn't load class (BirdWeb::Admin) because: Cannot delegate
meta_type_constraint to tc because the value of type_constraints is not
defined at /usr/local/lib/perl/5.10.1/Moose/Meta/Method/Delegation.pm line
99

Parse::Method::Signatures::Param::meta_type_constraint('MooseX::Traits::__ANON__::SERIAL::230=HASH(0xd8d2ea8)')
called at
/usr/local/share/perl/5.10.1/CatalystX/Declare/Controller/Meta/TypeConstraintMapping.pm
line 76

CatalystX::Declare::Controller::Meta::TypeConstraintMapping::add_method('CODE(0xd765ce0)',
'Moose::Meta::Class::__ANON__::SERIAL::7=HASH(0xd70e6b8)', 'repository',
'MooseX::Method::Signatures::Meta::Method=HASH(0xd90d190)') called at
/usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 162

Class::MOP::Method::Wrapped::__ANON__('Moose::Meta::Class::__ANON__::SERIAL::7=HASH(0xd70e6b8)',
'repository', 'MooseX::Method::Signatures::Meta::Method=HASH(0xd90d190)')
called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 91

Moose::Meta::Class::__ANON__::SERIAL::7::add_method('Moose::Meta::Class::__ANON__::SERIAL::7=HASH(0xd70e6b8)',
'repository', 'MooseX::Method::Signatures::Meta::Method=HASH(0xd90d190)')
called at
/usr/local/share/perl/5.10.1/MooseX/Declare/Syntax/Keyword/Method.pm line 20

MooseX::Declare::Syntax::Keyword::Method::register_method_declaration('MooseX::Declare::Syntax::Keyword::Method=HASH(0xd6fe8e0)',
'Moose::Meta::Class::__ANON__::SERIAL::7=HASH(0xd70e6b8)', 'repository',
'MooseX::Method::Signatures::Meta::Method=HASH(0xd90d190)') called at
/usr/local/share/perl/5.10.1/MooseX/Declare/Syntax/MethodDeclaration.pm line
43

MooseX::Declare::Syntax::MethodDeclaration::__ANON__('Moose::Meta::Class::__ANON__::SERIAL::7=HASH(0xd70e6b8)',
'repository', 'MooseX::Method::Signatures::Meta::Method=HASH(0xd90d190)')
called at /usr/local/share/perl/5.10.1/MooseX/Method/Signatures.pm line 319
MooseX::Method::Signatures::__ANON__('CODE(0xd89e208)', 'repository')
called at
/home/alanh/src/birdwebadmin/script/../lib/BirdWeb/Admin/Controller/Images.pm
line 251
Catalyst::Utils::__ANON__() called at
/usr/local/share/perl/5.10.1/MooseX/Declare/Syntax/MooseSetup.pm line 81
MooseX::Declare::Syntax::MooseSetup::__ANON__('CODE(0xd6a9808)') called
at
/home/alanh/src/birdwebadmin/script/../lib/BirdWeb/Admin/Controller/Images.pm
line 252
require BirdWeb/Admin/Controller/Images.pm called at
/usr/local/share/perl/5.10.1/Catalyst/Utils.pm line 287
eval {...} called at /usr/local/share/perl/5.10.1/Catalyst/Utils.pm line
287

Catalyst::Utils::ensure_class_loaded('BirdWeb::Admin::Controller::Images',
'HASH(0xc6356b8)') called at /usr/local/share/perl/5.10.1/Catalyst.pm line
2473
Catalyst::setup_components('BirdWeb::Admin') called at
/usr/local/share/perl/5.10.1/Catalyst.pm line 1190

....

If I don't use named parameters all is well.

I just upgraded Catalyst::Devel, Moose, CatalystX::Declare, and
MooseX::Declare to the latest versions of each.

Any ideas?

- Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110926/7f2cdca4/attachment.htm

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedSep 26, '11 at 4:58p
activeSep 26, '11 at 4:58p
posts1
users1
websitecatalystframework.org
irc#catalyst

1 user in discussion

Alan Humphrey: 1 post

People

Translate

site design / logo © 2022 Grokbase