Author: autrijus
Date: Sat Apr  1 10:44:53 2006
New Revision: 8526

Modified:
   doc/trunk/design/syn/S12.pod

Log:
* S12: The "call" form can now be used to call the next
       MMD or SMD candidate.

       A "proto" declaration needs to happen before multis.

       Fix a misuse of ".call" method.

Modified: doc/trunk/design/syn/S12.pod
==============================================================================
--- doc/trunk/design/syn/S12.pod        (original)
+++ doc/trunk/design/syn/S12.pod        Sat Apr  1 10:44:53 2006
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall <[EMAIL PROTECTED]>
   Date: 27 Oct 2004
-  Last Modified: 23 Feb 2006
+  Last Modified: 1 Apr 2006
   Number: 12
-  Version: 10
+  Version: 11
 
 =head1 Overview
 
@@ -542,6 +542,13 @@
     :omit(Selector)     # only classes that don't match selector
     :include(Selector)  # only classes that match selector
 
+In addition to C<next METHOD>, the special function C<call> dispatches
+to the next candidate, possibly with a new argument list:
+
+    call;           # calls with the original arguments
+    call();         # calls with no arguments
+    call(1,2,3);    # calls with a different set of arguments
+
 =head1 Parallel dispatch
 
 Any of the method call forms may be turned into a hyperoperator by
@@ -681,6 +688,8 @@
 
 The C<sub> keyword is optional after either C<multi> or C<proto>.
 
+A C<proto> declaration must come before any matching multis, if at all.
+
 =head1 Roles
 
 Classes are primarily in charge of object management, and only
@@ -704,7 +713,7 @@
        method feed ($food) {
            $food.open_can;
            $food.put_in_bowl;
-           self.call;
+           self.some_other_method;
        }
     }
 

Reply via email to