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

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

From:
larry
Date:
August 17, 2006 16:08
Subject:
[svn:perl6-synopsis] r11113 - doc/trunk/design/syn
Message ID:
20060817230834.F40B7CB9BB@x12.develooper.com
Author: larry
Date: Thu Aug 17 16:08:34 2006
New Revision: 11113

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

Log:
Some leave simplifications.


Modified: doc/trunk/design/syn/S04.pod
==============================================================================
--- doc/trunk/design/syn/S04.pod	(original)
+++ doc/trunk/design/syn/S04.pod	Thu Aug 17 16:08:34 2006
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall <larry@wall.org>
   Date: 19 Aug 2004
-  Last Modified: 15 Aug 2006
+  Last Modified: 17 Aug 2006
   Number: 4
-  Version: 35
+  Version: 36
 
 This document summarizes Apocalypse 4, which covers the block and
 statement syntax of Perl.
@@ -504,13 +504,14 @@
 To return a value from a pointy block or bare closure, you either
 just let the block return the value of its final expression, or you can
 use C<leave>.  A C<leave> by default exits from the innermost block.
-But you may change the behavior of C<leave> with selector adverbs:
+But you may change the behavior of C<leave> with a selector as the
+first argument:
 
-    leave :from(Loop) :label<LINE> <== 1,2,3;	# XXX "with"?
+    leave Loop where { .label ~~ 'LINE' }, 1,2,3;
 
 The innermost block matching the selection criteria will be exited.
-The return value, if any, must be passed as a list.  To return pairs
-as part of the value, you can use a feed operator:
+The return value, if any, must be passed as the second and subsequent arguments.
+To return pairs as part of the value, you can use a feed operator:
 
     leave <== :foo:bar:baz(1) if $leaving;
 



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