Class::MOP::Package->initialize now checks Class::MOP::get_metaclass_by_name for...
Yuval Kogman [Thu, 14 Aug 2008 15:05:21 +0000 (15:05 +0000)]
lib/Class/MOP/Package.pm

index 5b42565..b54dbc0 100644 (file)
@@ -19,7 +19,8 @@ sub initialize {
     my $package_name = shift;
     # we hand-construct the class 
     # until we can bootstrap it
-    $class->_new({
+    return Class::MOP::get_metaclass_by_name($package_name) ||
+        $class->_new({
         'package'   => $package_name,
     });
 }