Author: allison Date: Tue Jul 31 12:22:27 2007 New Revision: 20384 Modified: trunk/docs/pdds/pdd15_objects.pod
Log: [PDD15] Clarifying can and does on class, role, and instance objects. Modified: trunk/docs/pdds/pdd15_objects.pod ============================================================================== --- trunk/docs/pdds/pdd15_objects.pod (original) +++ trunk/docs/pdds/pdd15_objects.pod Tue Jul 31 12:22:27 2007 @@ -353,11 +353,18 @@ Returns true or false if the class can perform the requested method. (Including with an AUTOLOAD) +A class object only reports on class methods, it does not report on instance +methods. + =item does(class *) Returns true or false to note whether the class in question implements the interface passed in. +A class object only reports on interfaces of the class (i.e. roles composed +into the metaclass), while an instance object only reports on interfaces of the +instance (i.e. roles composed into the class). + =item inspect() Return a data structure of all information relevant to introspection on @@ -518,6 +525,8 @@ Returns true if the class object can perform the requested method, false otherwise. +A class object only reports on class methods, not on instance methods. + =item does $I1 = $P2.does($S3) @@ -525,6 +534,10 @@ Returns true if the object in question implements the role, class, type, or behavior passed in, false otherwise. +A class object only reports on interfaces of the class (i.e. roles composed +into the metaclass), while an instance object only reports on interfaces of the +instance (i.e. roles composed into the class). + =item inspect $P1 = $P2.inspect() @@ -611,11 +624,16 @@ Returns true or false if the object can perform the requested method. (Including with an AUTOLOAD) +An instance object only reports on instance methods, not on class methods. + =item does(class *) Returns true or false to note whether the object in question implements the interface passed in. +An instance object only reports on interfaces of the instance (i.e. roles +composed into the class). + =item get_attr(STRING*) Returns the attribute with the fully qualified name for the object. @@ -713,6 +731,10 @@ Returns true or false to note whether the role in question implements the interface passed in. +A role object only reports on interfaces of the role (i.e. roles composed into +the metarole), it doesn't report on which interfaces will be added to an object +that composes the role. + =item clone Create an (anonymous) clone of the role.