diff options
author | James E Keenan <jkeenan@cpan.org> | 2021-02-07 18:31:02 +0000 |
---|---|---|
committer | Paul Evans <leonerd@leonerd.org.uk> | 2021-02-07 19:51:53 +0000 |
commit | c8a5f8f1bc6924cd1f304436fff733a4319c6d41 (patch) | |
tree | 2269ec0acbd915604be7f2622ec40257ab635a51 /pod/perlsyn.pod | |
parent | 874732f8cc911285f758070d901aa27e39918084 (diff) | |
download | perl-c8a5f8f1bc6924cd1f304436fff733a4319c6d41.tar.gz |
Emphasize need for variable declaration after 'catch'
For: https://github.com/Perl/perl5/issues/18541
Diffstat (limited to 'pod/perlsyn.pod')
-rw-r--r-- | pod/perlsyn.pod | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pod/perlsyn.pod b/pod/perlsyn.pod index 61908770b3..8e3bfbb562 100644 --- a/pod/perlsyn.pod +++ b/pod/perlsyn.pod @@ -636,7 +636,7 @@ If no exception was thrown then the C<catch> block does not happen. In either case, execution will then continue from the following statement - in this example the C<print>. -The C<catch> keyword is immediately followed by a variable declaration in +The C<catch> keyword must be immediately followed by a variable declaration in parentheses, which introduces a new variable visible to the body of the subsequent block. Inside the block this variable will contain the exception value that was thrown by the code in the C<try> block. It is not necessary |