push this stuff back into HasMethods and HasAttributes
[gitmo/Class-MOP.git] / lib / Class / MOP / Mixin / HasMethods.pm
index 50684a9..bd28e40 100644 (file)
@@ -189,6 +189,16 @@ sub _get_local_methods {
         keys %{$namespace};
 }
 
+sub _restore_metamethods_from {
+    my $self = shift;
+    my ($old_meta) = @_;
+
+    for my $method ($old_meta->_get_local_methods) {
+        $method->_make_compatible_with($self->method_metaclass);
+        $self->add_method($method->name => $method);
+    }
+}
+
 1;
 
 __END__