sub _get_maybe_raw_method {
my ( $self, $method_name ) = @_;
- my $method_map = $self->_method_map;
- my $map_entry = $method_map->{$method_name};
- my $code = $self->get_package_symbol(
+ my $map_entry = $self->_method_map->{$method_name};
+ return $map_entry if blessed $map_entry;
+
+ my $code = $self->get_package_symbol(
{
name => $method_name,
sigil => '&',
}
);
- # The !$code case seems to happen in some weird cases where methods
- # modifiers are added via roles or some other such bizareness. Honestly, I
- # don't totally understand this, but returning the entry works, and keeps
- # various MX modules from blowing up. - DR
- return $map_entry
- if blessed $map_entry && ( !$code || $map_entry->body == $code );
-
unless ($map_entry) {
return unless $code && $self->_code_is_mine($code);
}