Author: ruoso
Date: 2009-09-18 16:04:00 +0200 (Fri, 18 Sep 2009)
New Revision: 28284
Modified:
docs/Perl6/Spec/S06-routines.pod
Log:
[spec/S06] add a section for Introspection, with three proposed methods...
Modified: docs/Perl6/Spec/S06-routines.pod
===================================================================
--- docs/Perl6/Spec/S06-routines.pod 2009-09-18 11:53:05 UTC (rev 28283)
+++ docs/Perl6/Spec/S06-routines.pod 2009-09-18 14:04:00 UTC (rev 28284)
@@ -10,15 +10,15 @@
Damian Conway <[email protected]>
Allison Randal <[email protected]>
Larry Wall <[email protected]>
+ Daniel Ruoso <[email protected]>
=head1 VERSION
Created: 21 Mar 2003
- Last Modified: 11 Sep 2009
- Version: 115
+ Last Modified: 18 Sep 2009
+ Version: 116
-
This document summarizes Apocalypse 6, which covers subroutines and the
new type system.
@@ -2921,4 +2921,35 @@
for failing over every time. This is also more conducive to inlining,
since it's difficult to rewrite inlined calls.
+=head2 Introspection
+
+This section describes the methods implemented by the routine objects
+that allow introspection of the inner works of that routine.
+
+=head3 Routine
+
+=over
+
+=item .candidates
+
+This method returns a list of the candites associated with the current
+routine. A "only" routine should return a list with itself as the
+single item.
+
+=item .signature
+
+This method returns the signature of the current routine. If this is a
+multi, it should return a "any" junction of the signature of each
+candidate.
+
+=item .cando(\$capture)
+
+This method returns a list of the candidates that match the given
+capture.
+
+=back
+
+=head3 Signature
+
+
=for vim:set expandtab sw=4: