On Tue Jun 15 16:29:12 2010, BOBTFISH wrote:
Show quoted text> Heya, you didn't seem to attach the test case..
I did attach a file it just happened to be empty.
use strict;
use warnings;
{
package Catalyst::Controller;
use Moose;
use namespace::clean -except => 'meta';
use MooseX::MethodAttributes;
BEGIN { extends 'MooseX::MethodAttributes::Inheritable'; }
}
{
package ControllerRole;
use MooseX::Role::Parameterized -traits => 'MooseX::MethodAttributes::Role::Meta::Role';
use namespace::clean -except => 'meta';
parameter foo => (
isa => "Str",
);
role {
my $p = shift;
method base => sub : Chained('') PathPart('base') CaptureArgs(0) { };
};
sub index : Chained('base') PathPart('index') Args(0) { }
}
{
package TestApp::Controller::Foo;
use Moose;
use namespace::clean -except => 'meta';
BEGIN { extends qw/Catalyst::Controller/; }
with 'ControllerRole' => { foo => 23};
}
use Test::More tests => 1;
BEGIN { eval { require MooseX::Role::Parameterized } or plan skip_all => 'This test needs MooseX::Role::Parameterized' }
is_deeply(
TestApp::Controller::Foo->meta->get_method('base')->attributes,
[q{Chained('')}, q{PathPart('base')}, q{CaptureArgs(0)}],
);
done_testing;