Author: lwall Date: 2009-04-17 13:36:46 +0200 (Fri, 17 Apr 2009) New Revision: 26241
Modified: docs/Perl6/Spec/S04-control.pod Log: Document the 'when' statement modifier. Modified: docs/Perl6/Spec/S04-control.pod =================================================================== --- docs/Perl6/Spec/S04-control.pod 2009-04-17 05:38:26 UTC (rev 26240) +++ docs/Perl6/Spec/S04-control.pod 2009-04-17 11:36:46 UTC (rev 26241) @@ -12,9 +12,9 @@ Maintainer: Larry Wall <la...@wall.org> Date: 19 Aug 2004 - Last Modified: 17 Mar 2009 + Last Modified: 17 Apr 2009 Number: 4 - Version: 74 + Version: 75 This document summarizes Apocalypse 4, which covers the block and statement syntax of Perl. @@ -770,6 +770,15 @@ OUTER.break($retval) +There is a C<when> statement modifier, but it does not have any +break semantics. That is, + + doit() when 42; + +is exactly equivalent to + + doit() if $_ ~~ 42; + =head1 Exception handlers Unlike many other languages, PerlĀ 6 specifies exception handlers by