summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-05-29 07:22:51 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-05-29 07:22:51 +0000
commitd0340efeaf607d2e70273b4fa22e5ee3b358abe8 (patch)
tree8187e35c8e61d21279785c869e1a5d92009e8e57 /pp_sys.c
parentab39fa9dbf3b1a1fb7beb555653d0558a089397f (diff)
parenta1737d5b9df80320e5be59ab8fa7c96455d6b5bf (diff)
downloadperl-d0340efeaf607d2e70273b4fa22e5ee3b358abe8.tar.gz
[asperl] integrate mainline changes
p4raw-id: //depot/asperl@1055
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 0447f381ce..3a6010fa76 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 {