Browse files

make try an eager (or sink) contextualizer

  • Loading branch information...
1 parent 12b6d9f commit 7d6ac4c459eb7ab454b6501166eaa64222c94754 @TimToady TimToady committed Feb 28, 2013
Showing with 6 additions and 4 deletions.
  1. +6 −4 S04-control.pod
@@ -12,8 +12,8 @@ Synopsis 4: Blocks and Statements
Created: 19 Aug 2004
- Last Modified: 23 Feb 2013
- Version: 120
+ Last Modified: 27 Feb 2013
+ Version: 121
This document summarizes Apocalypse 4, which covers the block and
statement syntax of Perl.
@@ -869,7 +869,6 @@ is parsed as:
do { do { do { foo(); }}}; bar(43);
=head1 Switch statements
@@ -998,7 +997,10 @@ A C<try> block by default has a C<CATCH> block that handles all fatal
exceptions by ignoring them. If you define a C<CATCH> block within
the C<try>, it replaces the default C<CATCH>. It also makes the C<try>
keyword redundant, because any block can function as a C<try> block
-if you put a C<CATCH> block within it.
+if you put a C<CATCH> block within it. To prevent lazy lists for leaking out
+unexpectedly, the inside of a C<try> is always considered
+an eager context, unless the C<try> itself is in a sink context, in which
+case the inside of C<try> is also in sink context.
An exception handler is just a switch statement on an implicit topic
that happens to be the current exception to be dealt with.

0 comments on commit 7d6ac4c

Please sign in to comment.