[Moose-commits] r7253 - Class-MOP/trunk/lib/Class
sartak at code2.0beta.co.uk
sartak at code2.0beta.co.uk
Wed Jan 7 14:53:01 GMT 2009
Author: sartak
Date: 2009-01-07 06:53:00 -0800 (Wed, 07 Jan 2009)
New Revision: 7253
Modified:
Class-MOP/trunk/lib/Class/MOP.pm
Log:
Metaclass-cache documentation cleanups
Modified: Class-MOP/trunk/lib/Class/MOP.pm
===================================================================
--- Class-MOP/trunk/lib/Class/MOP.pm 2009-01-07 14:49:25 UTC (rev 7252)
+++ Class-MOP/trunk/lib/Class/MOP.pm 2009-01-07 14:53:00 UTC (rev 7253)
@@ -953,32 +953,32 @@
=head2 Metaclass cache functions
-Class::MOP holds a cache of metaclasses, the following are functions
+Class::MOP holds a cache of metaclasses. The following are functions
(B<not methods>) which can be used to access that cache. It is not
-recommended that you mess with this, bad things could happen. But if
-you are brave and willing to risk it, go for it.
+recommended that you mess with these. Bad things could happen, but if
+you are brave and willing to risk it: go for it!
=over 4
=item B<get_all_metaclasses>
-This will return an hash of all the metaclass instances that have
-been cached by B<Class::MOP::Class> keyed by the package name.
+This will return a hash of all the metaclass instances that have
+been cached by B<Class::MOP::Class>, keyed by the package name.
=item B<get_all_metaclass_instances>
-This will return an array of all the metaclass instances that have
+This will return a list of all the metaclass instances that have
been cached by B<Class::MOP::Class>.
=item B<get_all_metaclass_names>
-This will return an array of all the metaclass names that have
+This will return a list of all the metaclass names that have
been cached by B<Class::MOP::Class>.
=item B<get_metaclass_by_name ($name)>
This will return a cached B<Class::MOP::Class> instance, or nothing
-if no metaclass exist by that C<$name>.
+if no metaclass exists with that C<$name>.
=item B<store_metaclass_by_name ($name, $meta)>
@@ -986,18 +986,19 @@
=item B<weaken_metaclass ($name)>
-In rare cases it is desireable to store a weakened reference in
-the metaclass cache. This function will weaken the reference to
-the metaclass stored in C<$name>.
+In rare cases (e.g. anonymous metaclasses) it is desirable to
+store a weakened reference in the metaclass cache. This
+function will weaken the reference to the metaclass stored
+in C<$name>.
=item B<does_metaclass_exist ($name)>
This will return true of there exists a metaclass stored in the
-C<$name> key and return false otherwise.
+C<$name> key, and return false otherwise.
=item B<remove_metaclass_by_name ($name)>
-This will remove a the metaclass stored in the C<$name> key.
+This will remove the metaclass stored in the C<$name> key.
=back
More information about the Moose-commits
mailing list