From: Dave Rolsky Date: Sun, 14 Sep 2008 02:56:06 +0000 (+0000) Subject: Add comment on my voodoo line which makes all my tests pass X-Git-Tag: 0.58~34^2~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b58714ddb3093af34999c048d6655a401ea73f64;p=gitmo%2FMoose.git Add comment on my voodoo line which makes all my tests pass --- diff --git a/lib/Moose/Meta/Class.pm b/lib/Moose/Meta/Class.pm index 5d397aa..2bfe0cc 100644 --- a/lib/Moose/Meta/Class.pm +++ b/lib/Moose/Meta/Class.pm @@ -391,6 +391,11 @@ sub _reinitialize_with { bless $self, ref $new_self; + # FIXME? This seems to be necessary in some cases because of how + # Class::MOP::Class->construct_class_instance will weaken the + # metaclass store entry for an anonymous class. However, if that + # anonymous class is a metaclass's metaclass, we don't want it + # going out of scope. I'm not sure this is the right fix at all. Class::MOP::store_metaclass_by_name( $self->name, $self ); }