diff options
author | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2021-11-22 21:58:33 +0000 |
---|---|---|
committer | Paul Evans <leonerd@leonerd.org.uk> | 2021-11-23 17:59:07 +0000 |
commit | 315aa462c3428ddd2c98859439cef0a0a9edbb67 (patch) | |
tree | b3f309d3b5a355bc65a6f3be1a10f8a804fe7f34 /pod/perldiag.pod | |
parent | e62a62a08b0c8568cfc68c82661b8e23f728477d (diff) | |
download | perl-315aa462c3428ddd2c98859439cef0a0a9edbb67.tar.gz |
Forbid using 'goto' to jump into a 'defer' block because everything will break when it's done
Diffstat (limited to 'pod/perldiag.pod')
-rw-r--r-- | pod/perldiag.pod | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 97a974f97f..468f29859f 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -1042,6 +1042,11 @@ error occurs in cases such as these: goto G; $x + do { G: $y }; # How is + supposed to get its first operand? +=item Can't "goto" into a defer block + +(F) A "goto" statement was executed to jump into the scope of a defer +block. This is not permitted. + =item Can't "goto" into a "given" block (F) A "goto" statement was executed to jump into the middle of a C<given> |