summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-10-09 18:48:31 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-10-09 18:48:31 +0000
commit865be8325e7f3f3238a9773fffa973af7594f852 (patch)
treecc037a3952abda0b21618a76466a272bb1088ca6 /perl.c
parentb0d9ce3858aa1d5f16f24f50ca1172e6eb75fcd9 (diff)
downloadperl-865be8325e7f3f3238a9773fffa973af7594f852.tar.gz
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
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/perl.c b/perl.c
index d7d7a57b0e..aca20cb437 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;