Permalink
Browse files

[spec/S06] add a section for Introspection, with three proposed metho…

…ds...

git-svn-id: http://svn.pugscode.org/pugs@28284 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 8cb24af commit c2db802b5d3a6348a87826ab1a7c478da9ccdda3 ruoso committed Sep 18, 2009
Showing with 34 additions and 3 deletions.
  1. +34 −3 S06-routines.pod
View
@@ -10,14 +10,14 @@ Synopsis 6: Subroutines
Damian Conway <damian@conway.org>
Allison Randal <al@shadowed.net>
Larry Wall <larry@wall.org>
+ Daniel Ruoso <daniel@ruoso.com>
=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 @@ the time compared to the cost of failing to bind, that tends to argue
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:

0 comments on commit c2db802

Please sign in to comment.