need to use real_ref_name in one more place
Jesse Luehrs [Sat, 5 Jun 2010 21:00:26 +0000 (16:00 -0500)]
Changes
lib/Moose/Meta/Class.pm
t/050_metaclasses/053_immutable_metaclass_compat_bug.t [moved from t/600_todo_tests/007_immutable_metaclass_compat.t with 91% similarity]

diff --git a/Changes b/Changes
index 2df99dc..0f059e0 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,6 +1,11 @@
 Also see Moose::Manual::Delta for more details of, and workarounds
 for, noteworthy changes.
 
+  [BUG FIXES]
+
+  * Fixed a minor metaclass compatibility fixing bug dealing with immutable
+    classes and non-class metaclass traits (doy, dougdude).
+
 1.06 Tue, Jun 01, 2010
 
   [NEW FEATURES]
index a36ea37..cfefb4a 100644 (file)
@@ -585,13 +585,14 @@ sub _fix_single_metaclass_incompatibility {
             || confess "Can't fix metaclass incompatibility for "
                      . $self->name
                      . " because it is not pristine.";
+        my $super_meta_name = $super_meta->_real_ref_name;
         my $class_specific_meta_subclass_meta = $self->_reconcile_roles_for_metaclass($self->$metaclass_type, $super_meta->$metaclass_type);
         my $new_self = $super_meta->reinitialize(
             $self->name,
             $metaclass_type => $class_specific_meta_subclass_meta->name,
         );
 
-        $self->_replace_self( $new_self, blessed($super_meta) );
+        $self->_replace_self( $new_self, $super_meta_name );
     }
 }
 
@@ -32,9 +32,7 @@ use Test::More;
     );
     ::ok(!Foo->meta->is_immutable);
     extends 'Foo::Base';
-    { our $TODO; local $TODO = "inheriting makes this immutable";
     ::ok(!Foo->meta->is_immutable);
-    }
 }
 
 done_testing;