From: Dave Rolsky Date: Fri, 11 Sep 2009 15:22:13 +0000 (-0500) Subject: CMOP::Package should have an attribute for methods, just a private one X-Git-Tag: 0.93~9 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bcef1f7ccd2532332b64ec22c44b202395733411;p=gitmo%2FClass-MOP.git CMOP::Package should have an attribute for methods, just a private one --- diff --git a/lib/Class/MOP.pm b/lib/Class/MOP.pm index 1d97d40..bbe1b03 100644 --- a/lib/Class/MOP.pm +++ b/lib/Class/MOP.pm @@ -207,6 +207,18 @@ Class::MOP::Package->meta->add_attribute( ); Class::MOP::Package->meta->add_attribute( + Class::MOP::Attribute->new('_methods' => ( + reader => { + # NOTE: + # we just alias the original method + # rather than re-produce it here + '_full_method_map' => \&Class::MOP::Package::_full_method_map + }, + default => sub { {} } + )) +); + +Class::MOP::Package->meta->add_attribute( Class::MOP::Attribute->new('method_metaclass' => ( reader => { # NOTE: diff --git a/t/010_self_introspection.t b/t/010_self_introspection.t index 1057261..2ebdbf7 100644 --- a/t/010_self_introspection.t +++ b/t/010_self_introspection.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More tests => 300; +use Test::More tests => 302; use Test::Exception; use Class::MOP; @@ -164,6 +164,7 @@ my @class_mop_package_attributes = ( 'namespace', 'method_metaclass', 'wrapped_method_metaclass', + '_methods', ); my @class_mop_module_attributes = (