develooper Front page | perl.perl6.language | Postings from January 2007

[svn:perl6-synopsis] r13546 - doc/trunk/design/syn

From:
larry
Date:
January 29, 2007 15:05
Subject:
[svn:perl6-synopsis] r13546 - doc/trunk/design/syn
Message ID:
20070130000540.19564CBA1B@x12.develooper.com
Author: larry
Date: Mon Jan 29 16:05:40 2007
New Revision: 13546

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

Log:
More infonuggets for gaal++.


Modified: doc/trunk/design/syn/S04.pod
==============================================================================
--- doc/trunk/design/syn/S04.pod	(original)
+++ doc/trunk/design/syn/S04.pod	Mon Jan 29 16:05:40 2007
@@ -14,7 +14,7 @@
   Date: 19 Aug 2004
   Last Modified: 29 Jan 2007
   Number: 4
-  Version: 49
+  Version: 50
 
 This document summarizes Apocalypse 4, which covers the block and
 statement syntax of Perl.
@@ -494,6 +494,14 @@
 A C<gather> is not considered a loop, but it is easy to combine with a loop
 statement as in the examples above.
 
+If any function called as part of a C<take> list asks what its context
+is, it will be told it was called in list context regardless of the
+eventual binding of the returned C<Capture>.  If that is not the
+desired behavior you must coerce the call to an appropriate context.
+In any event, such a function is called only once at the time the
+C<Capture> object is generated, not when it is bound (which could
+happen more than once).
+
 =head2 Other C<do>-like forms
 
 Other similar C<Code>-only forms may also take bare statements,

Modified: doc/trunk/design/syn/S06.pod
==============================================================================
--- doc/trunk/design/syn/S06.pod	(original)
+++ doc/trunk/design/syn/S06.pod	Mon Jan 29 16:05:40 2007
@@ -13,9 +13,9 @@
 
   Maintainer: Larry Wall <larry@wall.org>
   Date: 21 Mar 2003
-  Last Modified: 28 Jan 2007
+  Last Modified: 29 Jan 2007
   Number: 6
-  Version: 67
+  Version: 68
 
 
 This document summarizes Apocalypse 6, which covers subroutines and the
@@ -1621,6 +1621,15 @@
 caller may use C<< prefix:<|> >> to inline the returned values as part of the
 new argument list.  The caller may also bind the returned C<Capture> directly.
 
+If any function called as part of a return list asks what its context
+is, it will be told it was called in list context regardless of the
+eventual binding of the returned C<Capture>.  If that is not the
+desired behavior you must coerce the call to an appropriate context,
+(or declare the return type of the function to perform such a coercion).
+In any event, such a function is called only once at the time the
+C<Capture> object is generated, not when it is later bound (which
+could happen more than once).
+
 =head2 The C<caller> function
 
 The C<caller> function returns an object that describes a particular 



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About