X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FUtil%2FMetaRole.pm;h=fa59f215a14cffee18fc2bfa02ddaa7cc52caa0d;hb=f75f625dfbf7c765bdfa127a59b49a4503344298;hp=c8053fd51cc2afd9540a6f98b791af55e61d39f8;hpb=b2ad68e3fbe4016e354980a636c1ed39e941162a;p=gitmo%2FMoose.git diff --git a/lib/Moose/Util/MetaRole.pm b/lib/Moose/Util/MetaRole.pm index c8053fd..fa59f21 100644 --- a/lib/Moose/Util/MetaRole.pm +++ b/lib/Moose/Util/MetaRole.pm @@ -3,7 +3,7 @@ package Moose::Util::MetaRole; use strict; use warnings; -our $VERSION = '0.67'; +our $VERSION = '0.72'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; @@ -48,6 +48,7 @@ sub _make_new_metaclass { metaclass attribute_metaclass method_metaclass + wrapped_method_metaclass instance_metaclass ); @@ -64,6 +65,7 @@ sub _make_new_metaclass { qw( attribute_metaclass method_metaclass + wrapped_method_metaclass instance_metaclass ); @@ -199,6 +201,8 @@ This specifies the class for which to alter the meta classes. =item * method_metaclass_roles => \@roles +=item * wrapped_method_metaclass_roles => \@roles + =item * instance_metaclass_roles => \@roles =item * constructor_class_roles => \@roles @@ -215,44 +219,6 @@ once. This function will apply the specified roles to the object's base class. -=head1 PROBLEMS WITH METACLASS ROLES AND SUBCLASS - -Because of the way this module works, there is an ordering problem -which occurs in certain situations. This sequence of events causes an -error: - -=over 4 - -=item 1. - -There is a class (ClassA) which uses some extension(s) that apply -roles to the metaclass. - -=item 2. - -You have another class (ClassB) which wants to subclass ClassA and -apply some more extensions. - -=back - -Normally, the call to C will happen at run time, I the -additional extensions are applied. This causes an error when we try to -make the metaclass for ClassB compatible with the metaclass for -ClassA. - -We hope to be able to fix this in the future. - -For now the workaround is for ClassB to make sure it extends ClassA -I it loads extensions: - - package ClassB; - - use Moose; - - BEGIN { extends 'ClassA' } - - use MooseX::SomeExtension; - =head1 AUTHOR Dave Rolsky Eautarch@urth.orgE