Skip to content

Commit e21c13e

Browse files
committed
undocument old lollipop semantics
1 parent d3c3141 commit e21c13e

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

S04-control.pod

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Synopsis 4: Blocks and Statements
1212

1313
Created: 19 Aug 2004
1414

15-
Last Modified: 30 July 2014
16-
Version: 134
15+
Last Modified: 18 Aug 2014
16+
Version: 135
1717

1818
This document summarizes Apocalypse 4, which covers the block and
1919
statement syntax of Perl.
@@ -326,8 +326,7 @@ invocant to the C<.haste> method.)
326326

327327
Conditional statement modifiers work as in Perl 5. So do the
328328
implicit conditionals implied by short-circuit operators. Note though that
329-
the contents of parens or brackets is parsed as a semicolon-separated list of
330-
I<statements>,
329+
the contents of parens or brackets is parsed as a statement,
331330
so you can say:
332331

333332
@x = 41, (42 if $answer), 43;
@@ -336,6 +335,10 @@ and that is equivalent to:
336335

337336
@x = 41, ($answer ?? 42 !! ()), 43
338337

338+
(Only a single statement is allowed inside parens or brackets; otherwise
339+
it will be interpreted as a LoL composer.
340+
See L<S02/"Multidimensional slices and parcels">.)
341+
339342
=head1 Loop statements
340343

341344
Looping statement modifiers are the same as in Perl 5 except that,
@@ -627,7 +630,7 @@ left parenthesis, much like the C<$> operator in Haskell. That is,
627630
precedence decisions do not cross a C<do> boundary, and the missing
628631
"right paren" is assumed at the next statement terminator or unmatched
629632
bracket. A C<do> is unnecessary immediately after any opening bracket as
630-
the syntax inside brackets is a semicolon-separated list of statements,
633+
the syntax inside brackets expects a statements,
631634
so the above can in fact be written:
632635

633636
@primesquares = ($_ if .is-prime for 1..100) »**» 2;

0 commit comments

Comments
 (0)