From: Dave Rolsky Date: Mon, 26 Apr 2010 17:52:29 +0000 (-0500) Subject: Use _real_ref_name to get ref name for a metaclass object. X-Git-Tag: 1.05~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a907317a731d6216613cc09f52a9781918a4ddf8;p=gitmo%2FMoose.git Use _real_ref_name to get ref name for a metaclass object. --- diff --git a/lib/Moose/Meta/Class.pm b/lib/Moose/Meta/Class.pm index 107dc0f..0bbdce7 100644 --- a/lib/Moose/Meta/Class.pm +++ b/lib/Moose/Meta/Class.pm @@ -434,9 +434,7 @@ sub _can_fix_class_metaclass_incompatibility_by_role_reconciliation { my $self = shift; my ($super_meta) = @_; - my $super_meta_name = $super_meta->is_immutable - ? $super_meta->_get_mutable_metaclass_name - : blessed($super_meta); + my $super_meta_name = $super_meta->_real_ref_name; my $common_base_name = $self->_find_common_base(blessed($self), $super_meta_name); # if they're not both moose metaclasses, and the cmop fixing couldn't # do anything, there's nothing more we can do @@ -541,9 +539,7 @@ sub _fix_class_metaclass_incompatibility { || confess "Can't fix metaclass incompatibility for " . $self->name . " because it is not pristine."; - my $super_meta_name = $super_meta->is_immutable - ? $super_meta->_get_mutable_metaclass_name - : blessed($super_meta); + my $super_meta_name = $super_meta->_real_ref_name; my $class_meta_subclass_meta = $self->_reconcile_roles_for_metaclass(blessed($self), $super_meta_name); my $new_self = $class_meta_subclass_meta->name->reinitialize( $self->name,