Make get_mutable_metaclass_name private (it was never documented to start with)
Dave Rolsky [Thu, 10 Sep 2009 17:40:03 +0000 (12:40 -0500)]
lib/Class/MOP/Class.pm
lib/Class/MOP/Class/Immutable/Trait.pm

index c2679a7..722dfdd 100644 (file)
@@ -69,7 +69,7 @@ sub _construct_class_instance {
     # get the name of the class appropriately
     $class = (ref($class)
                     ? ($class->is_immutable
-                        ? $class->get_mutable_metaclass_name()
+                        ? $class->_get_mutable_metaclass_name()
                         : ref($class))
                     : $class);
 
@@ -183,7 +183,7 @@ sub _check_metaclass_compatibility {
         # get the name of the class appropriately
         my $super_meta_type
             = $super_meta->is_immutable
-            ? $super_meta->get_mutable_metaclass_name()
+            ? $super_meta->_get_mutable_metaclass_name()
             : ref($super_meta);
 
         ($self->isa($super_meta_type))
@@ -965,7 +965,7 @@ sub _immutable_metaclass {
     # example of where this matters).
     my $meta_name
         = $meta->is_immutable
-        ? $meta->get_mutable_metaclass_name
+        ? $meta->_get_mutable_metaclass_name
         : ref $meta;
 
     my $immutable_meta = $meta_name->create(
@@ -1028,7 +1028,7 @@ sub _install_inlined_code {
 sub _rebless_as_mutable {
     my $self = shift;
 
-    bless $self, $self->get_mutable_metaclass_name;
+    bless $self, $self->_get_mutable_metaclass_name;
 
     return $self;
 }
index a21d3a0..471cc6a 100644 (file)
@@ -13,7 +13,7 @@ $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
 # the original class of the metaclass instance
-sub get_mutable_metaclass_name { $_[0]{__immutable}{original_class} }
+sub _get_mutable_metaclass_name { $_[0]{__immutable}{original_class} }
 
 sub immutable_options { %{ $_[0]{__immutable}{options} } }