need to initialize a moose meta if called from Moose::Meta::Class
Jesse Luehrs [Tue, 23 Jun 2009 05:23:27 +0000 (00:23 -0500)]
lib/Class/MOP/Class.pm

index 81e4ebe..f6a4c20 100644 (file)
@@ -1106,7 +1106,7 @@ sub _immutable_metaclass {
     else {
         my @super = ( $trait, ref($self) );
 
-        my $meta = Class::MOP::Class->initialize($class_name);
+        my $meta = $self->initialize($class_name);
         $meta->superclasses(@super);
 
         $meta->make_immutable;