Author: jnthn
Date: 2009-05-06 15:36:27 +0200 (Wed, 06 May 2009)
New Revision: 26700
Modified:
docs/Perl6/Spec/S12-objects.pod
Log:
[spec] Rename ^isa() to get list of parents to ^parents so there's no confusion
with .^isa(Foo) and consistency with .^does(Foo) and .^roles(). Also fill out
the introspection specification a little more.
Modified: docs/Perl6/Spec/S12-objects.pod
===================================================================
--- docs/Perl6/Spec/S12-objects.pod 2009-05-06 12:14:10 UTC (rev 26699)
+++ docs/Perl6/Spec/S12-objects.pod 2009-05-06 13:36:27 UTC (rev 26700)
@@ -1821,7 +1821,7 @@
subject optics, boxes
language ja_JP
licensed Artistic|GPL
- isa list of parent classes
+ parents list of parent classes
roles list of roles
disambig how to deal with ambiguous method names from roles
layout P6opaque, P6hash, P5hash, P5array, PyDict, Cstruct, etc.
@@ -1836,6 +1836,12 @@
prototype objects, in which case stringification is not likely to
produce something of interest to non-gurus.)
+The C<.^parents> method by default returns a flattened list of all
+parents sorted in MRO (dispatch) order. Other options are:
+
+ :local just returns the immediate parents
+ :hierarchical the inheritance heirarchy as nested arrays
+
The C<.^methods> method returns method-descriptors containing:
name the name of the method
@@ -1848,6 +1854,10 @@
specify whether you want to see a flattened or hierarchical view,
whether you're interested in private methods, and so forth.
+ :local only methods defined in the current class
+ :hierarchical methods by class structure (inheritance hierarchy)
+ :private include private methods
+
The C<.^attributes> method returns a list of attribute descriptors
that have traits like these:
@@ -1860,6 +1870,11 @@
build
readonly
+It also takes the parameters:
+
+ :local only methods defined in the current class
+ :hierarchical attributes by class structure (inheritance hierarchy)
+
Strictly speaking, metamethods like C<.isa()>, C<.does()>, and C<.can()>
should be called through the meta object: