[Catalyst] Actions as Moose::Role

Zbigniew Lukasiak zzbbyy at gmail.com
Mon Jun 16 21:05:50 BST 2008


On Mon, Jun 16, 2008 at 9:52 PM, J. Shirley <jshirley at gmail.com> wrote:
> On Mon, Jun 16, 2008 at 10:16 AM, Zbigniew Lukasiak <zzbbyy at gmail.com> wrote:
>> Hi,
>>
>> I wanted to start preparing for Catamoose and thought about extracting
>> some Controller code as Moose::Roles - but unfortunately Catalyst
>> attributes don't compile normally:
>>
>> Invalid CODE attributes: CaptureArgs(1) : Chained('/') at t/lib/Base.pm line 7
>>
>> In a simple class:
>>
>> package Base;
>> use strict;
>> use warnings;
>>
>> #use Moose::Role;
>>
>> sub basefoo  :CaptureArgs(1) :Chained('/') { }
>> sub baseendpoint :Args(1) :Chained('basefoo') { }
>>
>> 1;
>>
>>
>> --
>> Zbigniew Lukasiak
>> http://brudnopis.blogspot.com/
>> http://perlalchemy.blogspot.com/
>>
>
> Is it intentional to omit the "use base 'Catalyst::Controller';"?

Well - I was not sure about that - but with "use base
'Catalyst::Controller';" I get:

Could not load class (Base) because : Can't locate object method
"linearized_isa" via package "Moose::Meta::Role" at
/home/zby/progs/Catalyst-Runtime/5.80/branches/moose/lib/Catalyst/ClassData.pm
line 23.


-- 
Zbigniew Lukasiak
http://brudnopis.blogspot.com/
http://perlalchemy.blogspot.com/



More information about the Catalyst mailing list