summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-05-23 18:58:23 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-05-23 18:58:23 +0000
commit05423cc9de6f6e1f80405901832793163e71bb76 (patch)
treee3197e7ed9c9133da6f816a8b536613cb60af7bb /pp_sys.c
parentfe5e78edd9ab337ef125ca9ff835e10989fe0004 (diff)
downloadperl-05423cc9de6f6e1f80405901832793163e71bb76.tar.gz
[win32] merge changes#1016,1018 from maintbranch (1017 is n/a)
p4raw-link: @1018 on //depot/maint-5.004/perl: 2140f6165485c56d1f5c5732484d28716b8f4052 p4raw-link: @1016 on //depot/maint-5.004/perl: b2a0fe98888cc8cc9808cbb17ff2b7f00e09ee60 p4raw-id: //depot/win32/perl@1030
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/pp_sys.c b/pp_sys.c
index fee474fac2..09d2341962 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -324,6 +324,23 @@ PP(pp_die)
if(tmpsv ? SvROK(tmpsv) : SvROK(error)) {
if(tmpsv)
SvSetSV(error,tmpsv);
+ else if(sv_isobject(error)) {
+ HV *stash = SvSTASH(SvRV(error));
+ GV *gv = gv_fetchmethod(stash, "PROPAGATE");
+ if (gv) {
+ SV *file = sv_2mortal(newSVsv(GvSV(curcop->cop_filegv)));
+ SV *line = sv_2mortal(newSViv(curcop->cop_line));
+ EXTEND(SP, 3);
+ PUSHMARK(SP);
+ PUSHs(error);
+ PUSHs(file);
+ PUSHs(line);
+ PUTBACK;
+ perl_call_sv((SV*)GvCV(gv),
+ G_SCALAR|G_EVAL|G_KEEPERR);
+ sv_setsv(error,*stack_sp--);
+ }
+ }
pat = Nullch;
}
else {