From: Gurusamy Sarathy Date: Sun, 25 Oct 1998 07:07:29 +0000 (+0000) Subject: avoid bogus line number in XSUB redefined warnings X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=51f6edd3989ed41a21787e548e0b66b27028731e;p=p5sagit%2Fp5-mst-13.2.git avoid bogus line number in XSUB redefined warnings p4raw-id: //depot/perl@2070 --- diff --git a/op.c b/op.c index 6e2cc64..4af15e7 100644 --- a/op.c +++ b/op.c @@ -4037,7 +4037,8 @@ newXS(char *name, void (*subaddr) (CV * _CPERLproto), char *filename) && HvNAME(GvSTASH(CvGV(cv))) && strEQ(HvNAME(GvSTASH(CvGV(cv))), "autouse"))) { line_t oldline = PL_curcop->cop_line; - PL_curcop->cop_line = PL_copline; + if (PL_copline != NOLINE) + PL_curcop->cop_line = PL_copline; warner(WARN_REDEFINE, "Subroutine %s redefined",name); PL_curcop->cop_line = oldline; }