|| $self->throw_error("Unable to canonicalize the 'handles' option with $handles because its metaclass is not a Moose::Meta::Role", data => $handles);
return map { $_ => $_ }
- grep { $_ ne 'meta' } (
- $role_meta->get_method_list,
- map { $_->name } $role_meta->get_required_method_list,
+ map { $_->name }
+ grep { !$_->isa('Class::MOP::Method::Meta') } (
+ $role_meta->_get_local_methods,
+ $role_meta->get_required_method_list,
);
}
my $meta = $self->_find_delegate_metaclass;
if ($meta->isa('Class::MOP::Class')) {
return map { $_->name } # NOTE: !never! delegate &meta
- grep { $_->package_name ne 'Moose::Object' && $_->name ne 'meta' }
+ grep { $_->package_name ne 'Moose::Object' && !$_->isa('Class::MOP::Method::Meta') }
$meta->get_all_methods;
}
elsif ($meta->isa('Moose::Meta::Role')) {
my $role = $_;
my $aliases = $self->get_method_aliases_for_role($role);
my %excludes = map { $_ => undef } @{ $self->get_exclusions_for_role($role) };
- $excludes{meta} = undef;
(
(map {
exists $excludes{$_} ? () :
name => $_,
method => $role->get_method($_),
}
- } $role->get_method_list),
+ } map { $_->name }
+ grep { !$_->isa('Class::MOP::Method::Meta') }
+ $role->_get_local_methods),
(map {
+{
role => $role,
foreach my $method ( $role->_get_local_methods ) {
my $method_name = $method->name;
- next if $method_name eq 'meta';
+ next if $method->isa('Class::MOP::Method::Meta');
unless ( $self->is_method_excluded($method_name) ) {
my $method_name = $method->name;
- next if $method_name eq 'meta';
+ next if $method->isa('Class::MOP::Method::Meta');
unless ( $self->is_method_excluded($method_name) ) {
# (not inherited)
for my $method ( $meta->_get_local_methods ) {
# always ignore meta
- next if $method->name eq 'meta';
+ next if $method->isa('Class::MOP::Method::Meta');
# we'll deal with attributes below
next if $method->can('associated_attribute');
# if the method comes from a role we consumed, ignore it