From: Florian Ragwitz Date: Thu, 19 Feb 2009 07:18:54 +0000 (+0000) Subject: Use get_all_methods_with_attributes to get all possible actions. X-Git-Tag: 5.80001~40^2~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=a58af53dae9faa8a3f2ace190d607e17a6afa5d1;hp=6cd71736f0a8182dbaf040707fc0bc7a779e99c7 Use get_all_methods_with_attributes to get all possible actions. The list returned by get_all_methods_with_attributes has the same order in which the methods have been created. This fixes the last four failing tests. --- diff --git a/Makefile.PL b/Makefile.PL index 9226fd3..9fe331c 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -7,7 +7,7 @@ all_from 'lib/Catalyst/Runtime.pm'; requires 'namespace::clean'; requires 'Scope::Upper' => '0.06'; -requires 'MooseX::MethodAttributes::Inheritable'; +requires 'MooseX::MethodAttributes::Inheritable' => '0.03'; requires 'MooseX::Emulate::Class::Accessor::Fast' => '0.00800'; requires 'Moose' => '0.70'; requires 'Carp'; diff --git a/lib/Catalyst/Controller.pm b/lib/Catalyst/Controller.pm index e821a46..e79d79f 100644 --- a/lib/Catalyst/Controller.pm +++ b/lib/Catalyst/Controller.pm @@ -1,7 +1,7 @@ package Catalyst::Controller; use Moose; -use Moose::Util qw/find_meta does_role/; +use Moose::Util qw/find_meta/; use namespace::clean -except => 'meta'; @@ -181,8 +181,7 @@ sub register_actions { #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; + my @methods = $meta->get_all_methods_with_attributes; foreach my $method (@methods) { my $name = $method->name;