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 <[EMAIL PROTECTED]>
   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

Reply via email to