package Catalyst::Controller;
use Moose;
-use Moose::Util qw/find_meta does_role/;
+use Moose::Util qw/find_meta/;
use namespace::clean -except => 'meta';
#this is still not correct for some reason.
my $namespace = $self->action_namespace($c);
my $meta = find_meta($self);
- my @methods = grep { does_role($_, 'MooseX::MethodAttributes::Role::Meta::Method') }
- $meta->get_all_methods;
+ confess("Metaclass for " . ref($meta) ." for " . $meta->name
+ . " cannot support register_actions.")
+ unless $meta->can('get_all_methods_with_attributes');
+ my @methods = $meta->get_all_methods_with_attributes;
foreach my $method (@methods) {
my $name = $method->name;
if $c->debug;
next;
}
- my $reverse = $namespace ? "${namespace}/${method}" : $method;
+ my $reverse = $namespace ? "${namespace}/${name}" : $name;
my $action = $self->create_action(
name => $name,
code => $method->body,