Branch: refs/heads/yves/consistent_error_exits
Home: https://github.com/Perl/perl5
Commit: 130f63d6771e2bc99424f7ce0738711da3cfea67
https://github.com/Perl/perl5/commit/130f63d6771e2bc99424f7ce0738711da3cfea67
Author: Yves Orton <[email protected]>
Date: 2023-02-19 (Sun, 19 Feb 2023)
Changed paths:
M embed.fnc
M embed.h
M pp_ctl.c
M proto.h
M t/op/die.t
M t/op/eval.t
M util.c
Log Message:
-----------
toke.c - invoke __DIE__ handler after compilation errors in eval
Currently whether the __DIE__ signal handler triggers during compilation
of an eval string depends on the selection of the errors it contains.
Certain types of compilation error are considered "deferred errors" and
will not terminate compilation immediately, for instance undeclared
variables do not confuse the compiler so they do not trigger immediate
termination, and we will report them without limit provided they are the
only errors encountered. Whether a given error terminates compilation or
not or uses the error count to decide to do so seems to be somewhat
random, and it is quite possible that compilation can complete, with
errors, without ever "throwing" the exception so it can be passed to the
__DIE__ handler.
This patch ensures that when the eval has failed due to errors the
$SIG{__DIE__} handler is invoked before the eval completes.
Commit: ea1f49c3b8baf0642f42a2401b1fc39759cafe36
https://github.com/Perl/perl5/commit/ea1f49c3b8baf0642f42a2401b1fc39759cafe36
Author: Yves Orton <[email protected]>
Date: 2023-02-19 (Sun, 19 Feb 2023)
Changed paths:
M perl.h
M perly.c
M pp_ctl.c
M t/op/eval.t
M t/op/signatures.t
M t/uni/parser.t
M toke.c
Log Message:
-----------
perl.h, pp_ctl.c - switch to standard way of terminating compilation
I did not fully understand the use of yyquit() when I implemented
the SYNTAX_ERROR related stuff. It is not needed, and switching to this
makes eval compile error messages more consistent.
Commit: 36f3747db4403a4500aea44f987f604bc01d48a1
https://github.com/Perl/perl5/commit/36f3747db4403a4500aea44f987f604bc01d48a1
Author: Yves Orton <[email protected]>
Date: 2023-02-19 (Sun, 19 Feb 2023)
Changed paths:
M pp_ctl.c
M t/lib/feature/bundle
M t/lib/strict/vars
M toke.c
Log Message:
-----------
pp_ctl.c - Consistently exit after 10 errors
Currently we only check the error count when we report an error via
yyerror(), even though we say we will stop processing after 10 errors.
Errors reported directly to qerror() bypass the check.
This fixes this so that we check the number of errors reported in
qerror() itself. We also change qerror() so that qerror(NULL) triggers
the exception, this way we can move the logic out of yyerror and into
qerror().
Compare: https://github.com/Perl/perl5/compare/3cdb3de9918b...36f3747db440