On Jul 18, George Schlossnagle said:

>It appears that -T cause perl to avoid doing the stat, opting for open
>and fstat instead (so that it can check the file header to see if it's
>text).  The open of course fails, and thus the stat does not get
>populated.

That's exactly what I found.  My patch (which has been sent to p5p):

--- pp_sys.c.old        Thu Jul 18 10:55:42 2002
+++ pp_sys.c    Thu Jul 18 11:23:42 2002
@@ -3340,6 +3340,9 @@
        if (!(fp = PerlIO_open(SvPVX(PL_statname), "r"))) {
            if (ckWARN(WARN_NEWLINE) && strchr(SvPV(sv, n_a), '\n'))
                Perl_warner(aTHX_ packWARN(WARN_NEWLINE), PL_warn_nl, "open");
+           PUSHs(sv);
+           my_stat();
+           (void) POPs;
            RETPUSHUNDEF;
        }
        PL_laststatval = PerlLIO_fstat(PerlIO_fileno(fp), &PL_statcache);

I also included an addition to the test suite.  But now we're approaching
OT.

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to