From: Dave Rolsky Date: Sat, 14 Aug 2010 17:24:38 +0000 (+0200) Subject: Use new _get_local_methods API, and add it to MM::Role::Composite X-Git-Tag: 1.10~14 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=723576c68f3a70c51941c18b17b40a517cdab3da;p=gitmo%2FMoose.git Use new _get_local_methods API, and add it to MM::Role::Composite --- diff --git a/lib/Moose/Meta/Class.pm b/lib/Moose/Meta/Class.pm index 66813e1..dc32470 100644 --- a/lib/Moose/Meta/Class.pm +++ b/lib/Moose/Meta/Class.pm @@ -407,7 +407,7 @@ sub _is_role_only_subclass { # loop over all methods that are a part of the current class # (not inherited) - for my $method (map { $meta->get_method($_) } $meta->get_method_list) { + for my $method ( $meta->_get_local_methods ) { # always ignore meta next if $method->name eq 'meta'; # we'll deal with attributes below diff --git a/lib/Moose/Meta/Role/Composite.pm b/lib/Moose/Meta/Role/Composite.pm index a42b68f..c720533 100644 --- a/lib/Moose/Meta/Role/Composite.pm +++ b/lib/Moose/Meta/Role/Composite.pm @@ -101,6 +101,11 @@ sub get_method_list { return keys %{ $self->_method_map }; } +sub _get_local_methods { + my $self = shift; + return values %{ $self->_method_map }; +} + sub has_method { my ($self, $method_name) = @_;