From: Jesse Luehrs Date: Sat, 5 Jun 2010 21:00:26 +0000 (-0500) Subject: need to use real_ref_name in one more place X-Git-Tag: 1.07~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7f6c8567a8655943f5369c4ca1a8ef25b51b3999;p=gitmo%2FMoose.git need to use real_ref_name in one more place --- diff --git a/Changes b/Changes index 2df99dc..0f059e0 100644 --- 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] diff --git a/lib/Moose/Meta/Class.pm b/lib/Moose/Meta/Class.pm index a36ea37..cfefb4a 100644 --- a/lib/Moose/Meta/Class.pm +++ b/lib/Moose/Meta/Class.pm @@ -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 ); } } diff --git a/t/600_todo_tests/007_immutable_metaclass_compat.t b/t/050_metaclasses/053_immutable_metaclass_compat_bug.t similarity index 91% rename from t/600_todo_tests/007_immutable_metaclass_compat.t rename to t/050_metaclasses/053_immutable_metaclass_compat_bug.t index a1e8e09..8b8e13c 100755 --- a/t/600_todo_tests/007_immutable_metaclass_compat.t +++ b/t/050_metaclasses/053_immutable_metaclass_compat_bug.t @@ -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;