Author: larry
Date: Thu Feb 22 16:32:25 2007
New Revision: 13703

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

Log:
Clarify that a named argument may name either the label or the variable name.


Modified: doc/trunk/design/syn/S06.pod
==============================================================================
--- doc/trunk/design/syn/S06.pod        (original)
+++ doc/trunk/design/syn/S06.pod        Thu Feb 22 16:32:25 2007
@@ -13,9 +13,9 @@
 
   Maintainer: Larry Wall <[EMAIL PROTECTED]>
   Date: 21 Mar 2003
-  Last Modified: 16 Feb 2007
+  Last Modified: 22 Feb 2007
   Number: 6
-  Version: 71
+  Version: 72
 
 
 This document summarizes Apocalypse 6, which covers subroutines and the
@@ -519,6 +519,12 @@
     multi sub handle_event ($window, $event; $mode) {...}
     multi method set_name ($self: $name; $nick) {...}
 
+A double semicolon terminates the longest possible longname; parameters
+after this are never considered for multiple dispatch (except of course
+that they can still "veto" if their number or types mismatch).  (Note,
+the single semicolon form is still considered conjectural, though the
+double semicolon is fairly certain.)
+
 If the parameter list for a C<multi> contains no semicolon to delimit
 the list of important parameters, then all positional parameters are
 considered important.  If it's a C<multi method> or C<multi submethod>,
@@ -615,6 +621,11 @@
 
 so that you can use more descriptive internal parameter names without
 imposing inconveniently long external labels on named arguments.
+If a named argument does not match any label, it is matched against
+the variable names as a fallback.  This allows you to give both a
+short and a long name:
+
+    sub globalize (:g($global)) {...}
 
 Arguments that correspond to named parameters are evaluated in scalar
 context. They can only be passed by name, so it doesn't matter what

Reply via email to