From: Dave Rolsky Date: Thu, 23 Apr 2009 20:22:11 +0000 (-0500) Subject: a few more tweaks now that CMOP::Class->_immutable_metaclass is not public X-Git-Tag: 0.82_01^0 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e1c7a1b782328a57b63ba24de67a2a7f148ec959;p=gitmo%2FClass-MOP.git a few more tweaks now that CMOP::Class->_immutable_metaclass is not public --- diff --git a/lib/Class/MOP.pm b/lib/Class/MOP.pm index 54e5eed..ca8d2a4 100644 --- a/lib/Class/MOP.pm +++ b/lib/Class/MOP.pm @@ -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( diff --git a/t/010_self_introspection.t b/t/010_self_introspection.t index 48fd708..17d489b 100644 --- a/t/010_self_introspection.t +++ b/t/010_self_introspection.t @@ -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 diff --git a/t/070_immutable_metaclass.t b/t/070_immutable_metaclass.t index b2ee906..1a49fd7 100644 --- a/t/070_immutable_metaclass.t +++ b/t/070_immutable_metaclass.t @@ -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' );