a few more tweaks now that CMOP::Class->_immutable_metaclass is not public 0.82_01
Dave Rolsky [Thu, 23 Apr 2009 20:22:11 +0000 (15:22 -0500)]
lib/Class/MOP.pm
t/010_self_introspection.t
t/070_immutable_metaclass.t

index 54e5eed..ca8d2a4 100644 (file)
@@ -673,7 +673,7 @@ undef Class::MOP::Instance->meta->{_package_cache_flag};
 # the compile time of the MOP, and gives us no actual benefits.
 
 # this is just nitpicking to ensure Class::MOP::Class->meta == ->meta->meta
-Class::MOP::Class->meta->immutable_metaclass;
+Class::MOP::Class->meta->_immutable_metaclass;
 $Class::MOP::Class::immutable_metaclass_cache{"Class::MOP::Class"}{"Class::MOP::Class::Immutable::Trait"} = Class::MOP::Class::Immutable::Class::MOP::Class->meta;
 
 $_->meta->make_immutable(
index 48fd708..17d489b 100644 (file)
@@ -89,7 +89,8 @@ my @class_mop_class_methods = qw(
     _inline_destructor _immutable_options _rebless_as_immutable
     _rebless_as_mutable _remove_inlined_code
 
-    immutable_metaclass immutable_trait constructor_name constructor_class destructor_class 
+    _immutable_metaclass
+    immutable_trait constructor_name constructor_class destructor_class
 
     immutable_transformer
 
index b2ee906..1a49fd7 100644 (file)
@@ -42,9 +42,8 @@ use Class::MOP;
 
     $meta->make_immutable;
 
-    my $immutable_metaclass = $meta->immutable_metaclass->meta;
+    my $immutable_metaclass = $meta->_immutable_metaclass->meta;
 
-    #I don't understand why i need to ->meta here...
     my $obj = $immutable_metaclass->name;
 
     ok( !$obj->is_mutable,  '... immutable_metaclass is not mutable' );