From: Jesse Luehrs Date: Tue, 16 Nov 2010 17:01:03 +0000 (-0600) Subject: don't invalidate the method map if we add a method object X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3459c398e96f877a373bc0d8439b668a2752469a;p=gitmo%2FClass-MOP.git don't invalidate the method map if we add a method object --- diff --git a/lib/Class/MOP/Mixin/HasMethods.pm b/lib/Class/MOP/Mixin/HasMethods.pm index 2fe0135..939cd29 100644 --- a/lib/Class/MOP/Mixin/HasMethods.pm +++ b/lib/Class/MOP/Mixin/HasMethods.pm @@ -83,6 +83,10 @@ sub add_method { } $self->add_package_symbol("&$method_name", $body); + + # if we added the actual method object to the method map, we're still valid + $self->update_package_cache_flag + if blessed($method); } sub _code_is_mine {