X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FClass%2FMOP.pm;h=5a16bffa7c2e272b521561f4aaf2a1a38ae644e9;hb=5e57b7e6c595e4d4d893bda929beea1ee92f4c45;hp=493b95098e0ec84c78bb975676a5f634170a54b3;hpb=4b18c1b3cf8de42c2454663de378e9c3f2180352;p=gitmo%2FClass-MOP.git diff --git a/lib/Class/MOP.pm b/lib/Class/MOP.pm index 493b950..5a16bff 100644 --- a/lib/Class/MOP.pm +++ b/lib/Class/MOP.pm @@ -219,6 +219,42 @@ 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 + 'get_method_map' => \&Class::MOP::Package::get_method_map + }, + default => sub { {} } + )) +); + +Class::MOP::Package->meta->add_attribute( + Class::MOP::Attribute->new('method_metaclass' => ( + reader => { + # NOTE: + # we just alias the original method + # rather than re-produce it here + 'method_metaclass' => \&Class::MOP::Package::method_metaclass + }, + default => 'Class::MOP::Method', + )) +); + +Class::MOP::Package->meta->add_attribute( + Class::MOP::Attribute->new('wrapped_method_metaclass' => ( + reader => { + # NOTE: + # we just alias the original method + # rather than re-produce it here + 'wrapped_method_metaclass' => \&Class::MOP::Package::wrapped_method_metaclass + }, + default => 'Class::MOP::Method::Wrapped', + )) +); + ## -------------------------------------------------------- ## Class::MOP::Module @@ -283,18 +319,6 @@ Class::MOP::Class->meta->add_attribute( ); Class::MOP::Class->meta->add_attribute( - Class::MOP::Attribute->new('methods' => ( - reader => { - # NOTE: - # we just alias the original method - # rather than re-produce it here - 'get_method_map' => \&Class::MOP::Class::get_method_map - }, - default => sub { {} } - )) -); - -Class::MOP::Class->meta->add_attribute( Class::MOP::Attribute->new('superclasses' => ( accessor => { # NOTE: @@ -320,30 +344,6 @@ Class::MOP::Class->meta->add_attribute( ); Class::MOP::Class->meta->add_attribute( - Class::MOP::Attribute->new('method_metaclass' => ( - reader => { - # NOTE: - # we just alias the original method - # rather than re-produce it here - 'method_metaclass' => \&Class::MOP::Class::method_metaclass - }, - default => 'Class::MOP::Method', - )) -); - -Class::MOP::Class->meta->add_attribute( - Class::MOP::Attribute->new('wrapped_method_metaclass' => ( - reader => { - # NOTE: - # we just alias the original method - # rather than re-produce it here - 'wrapped_method_metaclass' => \&Class::MOP::Class::wrapped_method_metaclass - }, - default => 'Class::MOP::Method::Wrapped', - )) -); - -Class::MOP::Class->meta->add_attribute( Class::MOP::Attribute->new('instance_metaclass' => ( reader => { # NOTE: we need to do this in order