X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FAttribute.pm;h=77be3b44297d1c3334ed13c761264fd4a3c9d517;hp=c5482aa0425eef92d7a1c35d6498ceb4b7470687;hb=745220df2da2256a9bd2692ac585f39b35ed19df;hpb=30518636145442894e3a55a06ef3a57db268c76d diff --git a/lib/Mouse/Meta/Attribute.pm b/lib/Mouse/Meta/Attribute.pm index c5482aa..77be3b4 100644 --- a/lib/Mouse/Meta/Attribute.pm +++ b/lib/Mouse/Meta/Attribute.pm @@ -353,7 +353,9 @@ sub _canonicalize_handles { my $meta = Mouse::Meta::Class->initialize("$class_or_role"); # "" for stringify return map { $_ => $_ } grep { $_ ne 'meta' && !Mouse::Object->can($_) && $_ =~ $handles } - $meta->isa('Mouse::Meta::Class') ? $meta->get_all_method_names : $meta->get_method_list; + Mouse::Util::TypeConstraints::_is_a_metarole($meta) + ? $meta->get_method_list + : $meta->get_all_method_names; } else { $self->throw_error("Unable to canonicalize the 'handles' option with $handles");