develooper Front page | perl.perl6.language | Postings from April 2006

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

Thread Next
From:
larry
Date:
April 10, 2006 19:22
Subject:
[svn:perl6-synopsis] r8637 - doc/trunk/design/syn
Message ID:
20060411022157.49439CB9EC@x12.develooper.com
Author: larry
Date: Mon Apr 10 19:21:56 2006
New Revision: 8637

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

Log:
Bare block executes immediately; return of closure must be explicit.


Modified: doc/trunk/design/syn/S04.pod
==============================================================================
--- doc/trunk/design/syn/S04.pod	(original)
+++ doc/trunk/design/syn/S04.pod	Mon Apr 10 19:21:56 2006
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall <larry@wall.org>
   Date: 19 Aug 2004
-  Last Modified: 6 Apr 2006
+  Last Modified: 10 Apr 2006
   Number: 4
-  Version: 13
+  Version: 14
 
 This document summarizes Apocalypse 4, which covers the block and
 statement syntax of Perl.
@@ -287,6 +287,10 @@
 useful for the do-once block, since it is offically a loop and can take
 therefore loop control statements.
 
+Although a bare block is no longer a do-once loop, it still executes
+immediately as in Perl 5.  If you wish to return a closure from a
+function, you must use an explicit C<return>.
+
 =head1 Switch statements
 
 A switch statement is a means of topicalizing, so the switch keyword

Thread Next


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