From: Jesse Luehrs Date: Mon, 27 Sep 2010 01:14:42 +0000 (-0500) Subject: bootstrap the meta method in CMOP::Mixin too X-Git-Tag: 1.09~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=23ab51e474736f6ea918c160fc89f785122ec388;p=gitmo%2FClass-MOP.git bootstrap the meta method in CMOP::Mixin too --- diff --git a/lib/Class/MOP.pm b/lib/Class/MOP.pm index fabda7d..7393ac7 100644 --- a/lib/Class/MOP.pm +++ b/lib/Class/MOP.pm @@ -670,6 +670,12 @@ Class::MOP::Instance->meta->add_attribute( # need to replace the meta method there with a real meta method object Class::MOP::Object->meta->_add_meta_method; +## -------------------------------------------------------- +## Class::MOP::Mixin + +# need to replace the meta method there with a real meta method object +Class::MOP::Mixin->meta->_add_meta_method; + require Class::MOP::Deprecated unless our $no_deprecated; # we need the meta instance of the meta instance to be created now, in order diff --git a/lib/Class/MOP/Method/Meta.pm b/lib/Class/MOP/Method/Meta.pm index e339832..a22ac55 100644 --- a/lib/Class/MOP/Method/Meta.pm +++ b/lib/Class/MOP/Method/Meta.pm @@ -31,6 +31,7 @@ sub _generate_meta_method { # it's okay to call meta methods on metaclasses, since we # explicitly ask for them if !$_[0]->isa('Class::MOP::Object') + && !$_[0]->isa('Class::MOP::Mixin') # it's okay if the test itself calls ->meta, we only care about # if the mop internals call ->meta && $method_self->_is_caller_mop_internal(scalar caller);