From: Shawn M Moore Date: Sat, 28 Mar 2009 21:33:44 +0000 (-0400) Subject: Small refactor and class_of in MetaRole::_make_new_metaclass X-Git-Tag: 0.73_01~36^2~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=aa1bb57eec990c85696c56acdde0d00c52a2ee0b;p=gitmo%2FMoose.git Small refactor and class_of in MetaRole::_make_new_metaclass --- diff --git a/lib/Moose/Util/MetaRole.pm b/lib/Moose/Util/MetaRole.pm index 4855867..70f9a16 100644 --- a/lib/Moose/Util/MetaRole.pm +++ b/lib/Moose/Util/MetaRole.pm @@ -53,10 +53,9 @@ sub _make_new_metaclass { instance_metaclass ); + my $old_meta = Class::MOP::class_of($for); my $new_metaclass - = _make_new_class( ref $for->meta(), $options->{metaclass_roles} ); - - my $old_meta = $for->meta(); + = _make_new_class( ref $old_meta, $options->{metaclass_roles} ); # This could get called for a Moose::Meta::Role as well as a Moose::Meta::Class my %classes = map {