From: Dave Rolsky Date: Thu, 10 Sep 2009 17:40:03 +0000 (-0500) Subject: Make get_mutable_metaclass_name private (it was never documented to start with) X-Git-Tag: 0.92_01~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3423347430ff9c5ab90ec13ddcf39f6e5432b972;p=gitmo%2FClass-MOP.git Make get_mutable_metaclass_name private (it was never documented to start with) --- diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm index c2679a7..722dfdd 100644 --- a/lib/Class/MOP/Class.pm +++ b/lib/Class/MOP/Class.pm @@ -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; } diff --git a/lib/Class/MOP/Class/Immutable/Trait.pm b/lib/Class/MOP/Class/Immutable/Trait.pm index a21d3a0..471cc6a 100644 --- a/lib/Class/MOP/Class/Immutable/Trait.pm +++ b/lib/Class/MOP/Class/Immutable/Trait.pm @@ -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} } }