From: Shawn M Moore Date: Sat, 28 Mar 2009 21:24:11 +0000 (-0400) Subject: class_of MetaRole X-Git-Tag: 0.73_01~36^2~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9f6053681287929ddbaaf80ecd4d53c8863617b2;p=gitmo%2FMoose.git class_of MetaRole --- diff --git a/lib/Moose/Util/MetaRole.pm b/lib/Moose/Util/MetaRole.pm index 948c512..d78cff7 100644 --- a/lib/Moose/Util/MetaRole.pm +++ b/lib/Moose/Util/MetaRole.pm @@ -16,8 +16,9 @@ sub apply_metaclass_roles { my $for = $options{for_class}; - my %old_classes - = map { $_ => $for->meta->$_ } grep { $for->meta->can($_) } @Classes; + my %old_classes = map { $_ => Class::MOP::class_of($for)->$_ } + grep { Class::MOP::class_of($for)->can($_) } + @Classes; my $meta = _make_new_metaclass( $for, \%options );