From: Jesse Luehrs Date: Thu, 11 Nov 2010 21:25:31 +0000 (-0600) Subject: move the package_cache stuff back into ::HasMethods X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fd05ff5f1f8bfebdfc0845412739a6997cbc02b0;p=gitmo%2FClass-MOP.git move the package_cache stuff back into ::HasMethods --- diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm index b2fafd9..d2f0b0a 100644 --- a/lib/Class/MOP/Class.pm +++ b/lib/Class/MOP/Class.pm @@ -181,18 +181,6 @@ sub _new { }, $class; } -sub reset_package_cache_flag { (shift)->{'_package_cache_flag'} = undef } -sub update_package_cache_flag { - my $self = shift; - # NOTE: - # we can manually update the cache number - # since we are actually adding the method - # to our cache as well. This avoids us - # having to regenerate the method_map. - # - SL - $self->{'_package_cache_flag'} = Class::MOP::check_package_cache_flag($self->name); -} - ## Metaclass compatibility { my %base_metaclass = ( diff --git a/lib/Class/MOP/Mixin/HasMethods.pm b/lib/Class/MOP/Mixin/HasMethods.pm index d40d449..d3ceaa8 100644 --- a/lib/Class/MOP/Mixin/HasMethods.pm +++ b/lib/Class/MOP/Mixin/HasMethods.pm @@ -213,6 +213,18 @@ sub _restore_metamethods_from { } } +sub reset_package_cache_flag { (shift)->{'_package_cache_flag'} = undef } +sub update_package_cache_flag { + my $self = shift; + # NOTE: + # we can manually update the cache number + # since we are actually adding the method + # to our cache as well. This avoids us + # having to regenerate the method_map. + # - SL + $self->{'_package_cache_flag'} = Class::MOP::check_package_cache_flag($self->name); +} + 1; __END__ diff --git a/t/010_self_introspection.t b/t/010_self_introspection.t index d16e252..99cbc87 100644 --- a/t/010_self_introspection.t +++ b/t/010_self_introspection.t @@ -55,9 +55,6 @@ my @class_mop_class_methods = qw( initialize reinitialize create - update_package_cache_flag - reset_package_cache_flag - create_anon_class is_anon_class instance_metaclass get_meta_instance