- added Class::MOP::Method (and its subclasses)
to the bootstrap
- adjusted tests for this
+ - added the Class::MOP::Instance attributes
+ to the bootstrap
- bootstrap no longer re-compiles accessors
so as to keep the MOP compile-time fast
- methods are no longer blessed CODE refs
but are actual objects which can be CODE-ified
- adjusted tests to compensate
+ - adjusted docs for this
* Class::MOP::Class
- changed how methods are dealt with to
a duplicate name, and properly removes the
old one before installing the new one
- added tests for this
+ - adjusted docs for this
* Class::MOP::Class::Immutable
- added caching of &get_method_map
);
## --------------------------------------------------------
+## Class::MOP::Instance
+
+# NOTE:
+# these don't yet do much of anything, but are just
+# included for completeness
+
+Class::MOP::Instance->meta->add_attribute(
+ Class::MOP::Attribute->new('meta')
+);
+
+Class::MOP::Instance->meta->add_attribute(
+ Class::MOP::Attribute->new('slots')
+);
+
+## --------------------------------------------------------
## Now close all the Class::MOP::* classes
# NOTE:
Class::MOP::Package
Class::MOP::Module
Class::MOP::Class
+
Class::MOP::Attribute
Class::MOP::Method
Class::MOP::Instance
+
Class::MOP::Object
Class::MOP::Attribute::Accessor
=item B<get_method ($method_name)>
-This will return a CODE reference of the specified C<$method_name>,
-or return undef if that method does not exist.
+This will return a Class::MOP::Method instance related to the specified
+C<$method_name>, or return undef if that method does not exist.
+
+The Class::MOP::Method is codifiable, so you can use it like a normal
+CODE reference, see L<Class::MOP::Method> for more information.
=item B<find_method_by_name ($method_name>
methods which the C<$attribute_meta_object> has will be installed
into the class at this time.
+B<NOTE>
+If an attribute already exists for C<$attribute_name>, the old one
+will be removed (as well as removing all it's accessors), and then
+the new one added.
+
=item B<has_attribute ($attribute_name)>
Checks to see if this class has an attribute by the name of
=head1 DESCRIPTION
The Method Protocol is very small, since methods in Perl 5 are just
-subroutines within the particular package. Basically all we do is to
-bless the subroutine.
+subroutines within the particular package. We provide a very basic
+introspection interface.
-Currently this package is largely unused. Future plans are to provide
-some very simple introspection methods for the methods themselves.
-Suggestions for this are welcome.
+This also contains the Class::MOP::Method::Wrapped subclass, which
+provides the features for before, after and around method modifiers.
=head1 METHODS
=item B<wrap (&code)>
-This simply blesses the C<&code> reference passed to it.
-
=back
=head2 Informational
=item B<wrap (&code)>
-This simply blesses the C<&code> reference passed to it.
-
=item B<get_original_method>
=back