diff options
author | Yves Orton <demerphq@gmail.com> | 2022-09-12 10:58:43 +0200 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2022-09-12 11:35:45 +0200 |
commit | 70910c0d8e79acb9fa80f7497dc95defb3a2aba4 (patch) | |
tree | 8c6947ff01e7eaee5fc47544f6656ac70189922a | |
parent | 91d110e02db3b8905c4c48d5fdd76a8439de31f3 (diff) | |
download | perl-70910c0d8e79acb9fa80f7497dc95defb3a2aba4.tar.gz |
pod/perldelta - add entries to the incompatible changes section
One is about syntax errors changing. The other is about -v stacking
precedence over -c and related issues of making the BEGIN{exit(0)}
work properly.
-rw-r--r-- | pod/perldelta.pod | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/pod/perldelta.pod b/pod/perldelta.pod index f3a659a0a3..a7e80f9e63 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -60,6 +60,35 @@ implicit close of the stream may produce a warning. [github #20060] +=head2 C<INIT> blocks no longer run after an C<exit()> in C<BEGIN> + +C<INIT> blocks will no longer run after an C<exit()> performed inside of +a C<BEGIN>. This means that the combination of the C<-v> option and the +C<-c> option no longer executes a compile check as well as showing the +perl version. The C<-v> option executes an exit(0) after printing the +version information inside of a C<BEGIN> block, and the C<-c> check is +implemented by using C<INIT> hooks, resulting in the C<-v> option taking +precedence. + +[github #1537] +[github #20181] + +=head2 Syntax errors will no longer produce "phantom error messages". + +Generally perl will continue parsing the source code even after +encountering a compile error. In many cases this is helpful, for +instance with misspelled variable names it is helpful to show as many +examples of the error as possible. But in the case of syntax errors +continuing often produces bizarre error messages, and may even cause +segmentation faults during the compile process. In this release the +compiler will halt at the first syntax error encountered. This means +that any code expecting to see the specific error messages we used to +produce will be broken. The error that is emitted will be one of the +diagnostics that used to be produced, but in some cases some messages +that used to be produced will no longer be displayed. + +See L<Changes to Existing Diagnostics> for more details. + =head1 Deprecations XXX Any deprecated features, syntax, modules etc. should be listed here. |