diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-10-25 07:07:29 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-10-25 07:07:29 +0000 |
commit | 51f6edd3989ed41a21787e548e0b66b27028731e (patch) | |
tree | ea8ad738654fbd5be49b046b41fc2e48054039e0 /op.c | |
parent | dbc63d465574018de759a7737c0926b69e546aa6 (diff) | |
download | perl-51f6edd3989ed41a21787e548e0b66b27028731e.tar.gz |
avoid bogus line number in XSUB redefined warnings
p4raw-id: //depot/perl@2070
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; } |