summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-10-25 07:07:29 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-10-25 07:07:29 +0000
commit51f6edd3989ed41a21787e548e0b66b27028731e (patch)
treeea8ad738654fbd5be49b046b41fc2e48054039e0
parentdbc63d465574018de759a7737c0926b69e546aa6 (diff)
downloadperl-51f6edd3989ed41a21787e548e0b66b27028731e.tar.gz
avoid bogus line number in XSUB redefined warnings
p4raw-id: //depot/perl@2070
-rw-r--r--op.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/op.c b/op.c
index 6e2cc641cf..4af15e7aae 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;
}