In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/8b31d4e4418231a55583884517e227471284c99f?hp=3f33d153bd4aa2e98501ccbc4ae56fabdbe3d985>
- Log ----------------------------------------------------------------- commit 8b31d4e4418231a55583884517e227471284c99f Author: Nicholas Clark <[email protected]> Date: Tue Sep 4 21:55:22 2012 +0200 Document when the early return in Perl_newPROG() is bypassed completely. ----------------------------------------------------------------------- Summary of changes: op.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/op.c b/op.c index 4c1c1a9..0b969e9 100644 --- a/op.c +++ b/op.c @@ -3055,6 +3055,17 @@ Perl_newPROG(pTHX_ OP *o) maybe other things) also take this path, because they set up PL_main_start and PL_main_root directly, without generating an optree. + + If the parsing the main program aborts (due to parse errors, + or due to BEGIN or similar calling exit), then newPROG() + isn't even called, and hence this code path and its cleanups + are skipped. This shouldn't make a make a difference: + * a non-zero return from perl_parse is a failure, and + perl_destruct() should be called immediately. + * however, if exit(0) is called during the parse, then + perl_parse() returns 0, and perl_run() is called. As + PL_main_start will be NULL, perl_run() will return + promptly, and the exit code will remain 0. */ PL_comppad_name = 0; -- Perl5 Master Repository
