X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FClass%2FMOP%2FMixin%2FHasMethods.pm;h=d40d449afddef03629859945c80717173c10bdd5;hb=38bcde3fc28279a00afced7eb6f29304d66af962;hp=d27f39688c9c369780266a1a875c8298dce928e4;hpb=e59e2f1316c417cd3f131d30f6845eac0d94f759;p=gitmo%2FClass-MOP.git diff --git a/lib/Class/MOP/Mixin/HasMethods.pm b/lib/Class/MOP/Mixin/HasMethods.pm index d27f396..d40d449 100644 --- a/lib/Class/MOP/Mixin/HasMethods.pm +++ b/lib/Class/MOP/Mixin/HasMethods.pm @@ -36,12 +36,6 @@ sub _add_meta_method { ); } -# This doesn't always get initialized in a constructor because there is a -# weird object construction path for subclasses of Class::MOP::Class. At one -# point, this always got initialized by calling into the XS code first, but -# that is no longer guaranteed to happen. -sub _method_map { $_[0]->{'methods'} ||= {} } - sub wrap_method_body { my ( $self, %args ) = @_; @@ -162,7 +156,7 @@ sub remove_method { ( defined $method_name && length $method_name ) || confess "You must define a method name"; - my $removed_method = delete $self->_full_method_map->{$method_name}; + my $removed_method = delete $self->_method_map->{$method_name}; $self->remove_package_symbol( { sigil => '&', type => 'CODE', name => $method_name } );