diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-03-08 22:36:30 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-03-08 22:36:30 +0000 |
commit | 81d867050a6cadfec251cfdfd6a537281c0f3eac (patch) | |
tree | 65dafb52ba178f1bc107d808ab949063c07391da /pp_ctl.c | |
parent | e49e380eaec0ac30de05f118388e614b3b7bbed9 (diff) | |
download | perl-81d867050a6cadfec251cfdfd6a537281c0f3eac.tar.gz |
Further MAD changes.
p4raw-id: //depot/perl@27428
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -2625,7 +2625,13 @@ PP(pp_exit) #endif } PL_exit_flags |= PERL_EXIT_EXPECTED; +#ifdef PERL_MAD + /* KLUDGE: disable exit 0 in BEGIN blocks when we're just compiling */ + if (anum || !(PL_minus_c && PL_madskills)) + my_exit(anum); +#else my_exit(anum); +#endif PUSHs(&PL_sv_undef); RETURN; } @@ -2885,7 +2891,8 @@ S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq) CvPADLIST(PL_compcv) = pad_new(padnew_SAVE); - SAVEMORTALIZESV(PL_compcv); /* must remain until end of current statement */ + if (!PL_madskills) + SAVEMORTALIZESV(PL_compcv); /* must remain until end of current statement */ /* make sure we compile in the right package */ @@ -2898,6 +2905,11 @@ S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq) SAVEFREESV(PL_beginav); SAVEI32(PL_error_count); +#ifdef PERL_MAD + SAVEI32(PL_madskills); + PL_madskills = 0; +#endif + /* try to compile it */ PL_eval_root = NULL; |