better MOP stuff
Stevan Little [Tue, 5 Sep 2006 06:27:34 +0000 (06:27 +0000)]
Changes
lib/Class/MOP.pm

diff --git a/Changes b/Changes
index 018d631..6f163f0 100644 (file)
--- a/Changes
+++ b/Changes
@@ -9,6 +9,8 @@ Revision history for Perl extension Class-MOP.
       - added Class::MOP::Method (and its subclasses) 
         to the bootstrap
         - adjusted tests for this
+      - bootstrap no longer re-compiles accessors
+        so as to keep the MOP compile-time fast
     
     * Class::MOP::Method
       *** API CHANGE ***
index 9b713f3..71656f9 100644 (file)
@@ -359,17 +359,28 @@ Class::MOP::Method::Wrapped->meta->add_attribute(
 ## --------------------------------------------------------
 ## Now close all the Class::MOP::* classes
 
-Class::MOP::Package  ->meta->make_immutable(inline_constructor => 0);
-Class::MOP::Module   ->meta->make_immutable(inline_constructor => 0);
-Class::MOP::Class    ->meta->make_immutable(inline_constructor => 0);
-Class::MOP::Attribute->meta->make_immutable(inline_constructor => 0);
-Class::MOP::Method   ->meta->make_immutable(inline_constructor => 0);
-Class::MOP::Instance ->meta->make_immutable(inline_constructor => 0);
-Class::MOP::Object   ->meta->make_immutable(inline_constructor => 0);
-
-# Class::MOP::Method subclasses 
-Class::MOP::Attribute::Accessor->meta->make_immutable(inline_constructor => 0);
-Class::MOP::Method::Wrapped    ->meta->make_immutable(inline_constructor => 0);
+# NOTE:
+# we don't need to inline the 
+# constructors or the accessors 
+# this only lengthens the compile 
+# time of the MOP, and gives us 
+# no actual benefits.
+
+$_->meta->make_immutable(
+    inline_constructor => 0,
+    inline_accessors   => 0,
+) for qw/
+    Class::MOP::Package  
+    Class::MOP::Module   
+    Class::MOP::Class    
+    Class::MOP::Attribute
+    Class::MOP::Method   
+    Class::MOP::Instance 
+    Class::MOP::Object   
+
+    Class::MOP::Attribute::Accessor
+    Class::MOP::Method::Wrapped    
+/;
 
 1;