From: Jarkko Hietaniemi Date: Wed, 2 Aug 2000 13:27:38 +0000 (+0000) Subject: The name of a filehandle does not have . X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=624590503086714d933ceb5a7947b31f6a66beb9;p=p5sagit%2Fp5-mst-13.2.git The name of a filehandle does not have . p4raw-id: //depot/perl@6490 --- diff --git a/doio.c b/doio.c index db570d1..7d52d6f 100644 --- a/doio.c +++ b/doio.c @@ -812,7 +812,7 @@ Perl_do_close(pTHX_ GV *gv, bool not_implicit) dTHR; if (ckWARN(WARN_UNOPENED)) Perl_warner(aTHX_ WARN_UNOPENED, - "Close on unopened file <%s>",GvENAME(gv)); + "Close on unopened file %s",GvENAME(gv)); SETERRNO(EBADF,SS$_IVCHAN); } return FALSE; @@ -1196,7 +1196,7 @@ Perl_my_stat(pTHX) if (tmpgv == PL_defgv) return PL_laststatval; if (ckWARN(WARN_UNOPENED)) - Perl_warner(aTHX_ WARN_UNOPENED, "Stat on unopened file <%s>", + Perl_warner(aTHX_ WARN_UNOPENED, "Stat on unopened file %s", GvENAME(tmpgv)); PL_statgv = Nullgv; sv_setpv(PL_statname,""); diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 4ccb671..d6bf043 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -1064,7 +1064,7 @@ not realizing that 777 will be interpreted as a decimal number, equivalent to 01411. Octal constants are introduced with a leading 0 in Perl, as in C. -=item Close on unopened file <%s> +=item Close on unopened file %s (W unopened) You tried to close a filehandle that was never opened. @@ -2990,7 +2990,7 @@ unless there was a failure. You probably wanted to use system() instead, which does return. To suppress this warning, put the exec() in a block by itself. -=item Stat on unopened file <%s> +=item Stat on unopened file %s (W unopened) You tried to use the stat() function (or an equivalent file test) on a filehandle that was either never opened or has since been @@ -3110,7 +3110,7 @@ for Perl to reach. Perl is doing you a favor by refusing. (W unopened) You tried to use the tell() function on a filehandle that was either never opened or has since been closed. -=item Test on unopened file <%s> +=item Test on unopened file %s (W unopened) You tried to invoke a file test operator on a filehandle that isn't open. Check your logic. See also L. diff --git a/pp_sys.c b/pp_sys.c index ff69a8f..aa6d0bd 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -3059,7 +3059,7 @@ PP(pp_fttext) else { if (ckWARN(WARN_UNOPENED)) { gv = cGVOP_gv; - Perl_warner(aTHX_ WARN_UNOPENED, "Test on unopened file <%s>", + Perl_warner(aTHX_ WARN_UNOPENED, "Test on unopened file %s", GvENAME(gv)); } SETERRNO(EBADF,RMS$_IFI); diff --git a/t/pragma/warn/doio b/t/pragma/warn/doio index 8fda1e9..813f149 100644 --- a/t/pragma/warn/doio +++ b/t/pragma/warn/doio @@ -12,7 +12,7 @@ warn(warn_nl, "open"); [Perl_do_open9] open(F, "true\ncd") - Close on unopened file <%s> [Perl_do_close] < at - line 3. +Close on unopened file fred at - line 3. ######## # doio.c [Perl_do_tell Perl_do_seek Perl_do_sysseek Perl_my_stat] use warnings 'io' ; @@ -115,7 +115,7 @@ EXPECT tell() on unopened file at - line 4. seek() on unopened file at - line 5. sysseek() on unopened file at - line 6. -Stat on unopened file at - line 7. +Stat on unopened file STDIN at - line 7. ######## # doio.c [Perl_do_print] use warnings 'uninitialized' ; diff --git a/t/pragma/warn/pp_sys b/t/pragma/warn/pp_sys index 3b9b2e0..ad5982a 100644 --- a/t/pragma/warn/pp_sys +++ b/t/pragma/warn/pp_sys @@ -331,7 +331,7 @@ close STDIN ; no warnings 'unopened' ; -T STDIN ; EXPECT -Test on unopened file at - line 4. +Test on unopened file STDIN at - line 4. ######## # pp_sys.c [pp_fttext] use warnings 'newline' ;