move the package_cache stuff back into ::HasMethods
[gitmo/Class-MOP.git] / lib / Class / MOP / Mixin / HasMethods.pm
index d40d449..d3ceaa8 100644 (file)
@@ -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__