From: Gurusamy Sarathy Date: Sat, 9 Oct 1999 18:48:31 +0000 (+0000) Subject: don't run END blocks when running under -c switch (older, X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=865be8325e7f3f3238a9773fffa973af7594f852;p=p5sagit%2Fp5-mst-13.2.git don't run END blocks when running under -c switch (older, rarely useful behavior may still be obtained by putting BEGIN { $^C = 0; exit; } at the end of the script) p4raw-id: //depot/perl@4323 --- diff --git a/perl.c b/perl.c index d7d7a57..aca20cb 100644 --- a/perl.c +++ b/perl.c @@ -651,7 +651,7 @@ setuid perl scripts securely.\n"); LEAVE; FREETMPS; PL_curstash = PL_defstash; - if (PL_endav) + if (PL_endav && !PL_minus_c) call_list(oldscope, PL_endav); return STATUS_NATIVE_EXPORT; case 3: @@ -1023,7 +1023,7 @@ perl_run(pTHXx) LEAVE; FREETMPS; PL_curstash = PL_defstash; - if (PL_endav) + if (PL_endav && !PL_minus_c) call_list(oldscope, PL_endav); #ifdef MYMALLOC if (PerlEnv_getenv("PERL_DEBUG_MSTATS")) @@ -3019,7 +3019,7 @@ Perl_call_list(pTHX_ I32 oldscope, AV *paramList) LEAVE; FREETMPS; PL_curstash = PL_defstash; - if (PL_endav) + if (PL_endav && !PL_minus_c) call_list(oldscope, PL_endav); PL_curcop = &PL_compiling; PL_curcop->cop_line = oldline;