summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-02-03 19:32:57 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-02-03 19:32:57 +0000
commit7c2549db3c820cf72273bacc18a4e3d2b361563d (patch)
tree090bebae000f40d9e110c26402a4d995a2d3b427 /op.c
parent1ac0c030938fdadc1de87ae3d73ac10fe6533072 (diff)
downloadperl-7c2549db3c820cf72273bacc18a4e3d2b361563d.tar.gz
Fix bug #8760 : cop_line isn't properly restored
when a module is loaded at runtime behind the scenes. p4raw-id: //depot/perl@18648
Diffstat (limited to 'op.c')
-rw-r--r--op.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/op.c b/op.c
index abd9417ec4..81120fa20e 100644
--- a/op.c
+++ b/op.c
@@ -2964,12 +2964,14 @@ Perl_vload_module(pTHX_ U32 flags, SV *name, SV *ver, va_list *args)
}
{
line_t ocopline = PL_copline;
+ line_t ocopline2 = PL_curcop->cop_line;
int oexpect = PL_expect;
utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(FALSE, 0),
veop, modname, imop);
PL_expect = oexpect;
PL_copline = ocopline;
+ PL_curcop->cop_line = ocopline2;
}
}