diff options
-rw-r--r-- | doio.c | 4 | ||||
-rw-r--r-- | pod/perldiag.pod | 6 | ||||
-rw-r--r-- | pp_sys.c | 2 | ||||
-rw-r--r-- | t/pragma/warn/doio | 6 | ||||
-rw-r--r-- | t/pragma/warn/pp_sys | 2 |
5 files changed, 10 insertions, 10 deletions
@@ -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 4ccb671251..d6bf043a78 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<perlfunc/-X>. @@ -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 8fda1e9246..813f149fb5 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] <<TODO + Close on unopened file %s [Perl_do_close] <<TODO $a = "fred";close("$a") tell() on unopened file [Perl_do_tell] @@ -96,7 +96,7 @@ close "fred" ; no warnings 'unopened' ; close "joe" ; EXPECT -Close on unopened file <fred> 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 <STDIN> 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 3b9b2e0fdb..ad5982ab81 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 <STDIN> at - line 4. +Test on unopened file STDIN at - line 4. ######## # pp_sys.c [pp_fttext] use warnings 'newline' ; |