Patch for a warning emitted twice, from :
Steve Grazzini [Wed, 11 Jun 2003 00:46:47 +0000 (20:46 -0400)]
Subject: [PATCH: perl@19733] "perldoc -f -X" + "extra warning from -T"
Message-ID: <20030611044647.GA16696@grazzini.net>

p4raw-id: //depot/perl@19751

pp_sys.c

index ae6d986..d9a8087 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3325,7 +3325,7 @@ PP(pp_fttext)
        PL_laststype = OP_STAT;
        sv_setpv(PL_statname, SvPV(sv, n_a));
        if (!(fp = PerlIO_open(SvPVX(PL_statname), "r"))) {
-           if (ckWARN(WARN_NEWLINE) && strchr(SvPV(sv, n_a), '\n'))
+           if (ckWARN(WARN_NEWLINE) && strchr(SvPV(PL_statname, n_a), '\n'))
                Perl_warner(aTHX_ packWARN(WARN_NEWLINE), PL_warn_nl, "open");
            RETPUSHUNDEF;
        }