From: Rafael Garcia-Suarez Date: Mon, 3 Feb 2003 19:32:57 +0000 (+0000) Subject: Fix bug #8760 : cop_line isn't properly restored X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7c2549db3c820cf72273bacc18a4e3d2b361563d;p=p5sagit%2Fp5-mst-13.2.git Fix bug #8760 : cop_line isn't properly restored when a module is loaded at runtime behind the scenes. p4raw-id: //depot/perl@18648 --- diff --git a/op.c b/op.c index abd9417..81120fa 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; } } diff --git a/t/lib/warnings/perlio b/t/lib/warnings/perlio index 63279ee..cb39e90 100644 --- a/t/lib/warnings/perlio +++ b/t/lib/warnings/perlio @@ -55,4 +55,4 @@ open(F, ">:xyz", "bb"); close F; END { 1 while unlink "bb" } # KEEP THIS WITH THE LAST TEST. EXPECT -perlio: unknown layer "xyz". +perlio: unknown layer "xyz" at - line 5.