Inline the clone method in CMOP::Method as an optimization
[gitmo/Class-MOP.git] / lib / Class / MOP.pm
index d4a2340..5e116a0 100644 (file)
@@ -37,7 +37,6 @@ our $AUTHORITY = 'cpan:STEVAN';
 require XSLoader;
 XSLoader::load( __PACKAGE__, $XS_VERSION );
 
-
 {
     # Metaclasses are singletons, so we cache them here.
     # there is no need to worry about destruction though
@@ -549,13 +548,6 @@ Class::MOP::Method->meta->add_attribute(
     ))
 );
 
-Class::MOP::Method->meta->add_method('clone' => sub {
-    my $self  = shift;
-    my $clone = $self->meta->clone_object($self, @_);
-    $clone->_set_original_method($self);
-    return $clone;
-});
-
 ## --------------------------------------------------------
 ## Class::MOP::Method::Wrapped