make "lstat FH" croak
[p5sagit/p5-mst-13.2.git] / pod / perldiag.pod
index af78458..76fb6aa 100644 (file)
@@ -1472,7 +1472,7 @@ to the end of your file without finding such a line.
 (W redefine) You redefined a format.  To suppress this warning, say
 
     {
-       no warnings;
+       no warnings 'redefine';
        eval "format NAME =...";
     }
 
@@ -1804,13 +1804,14 @@ neither as a system call or an ioctl call (SIOCATMARK).
 
 =item `%s' is not a code reference
 
-(W) The second (fourth, sixth, ...) argument of overload::constant needs
-to be a code reference. Either an anonymous subroutine, or a reference
+(W overload) The second (fourth, sixth, ...) argument of overload::constant
+needs to be a code reference. Either an anonymous subroutine, or a reference
 to a subroutine.
 
 =item `%s' is not an overloadable type
 
-(W) You tried to overload a constant type the overload package is unaware of.
+(W overload) You tried to overload a constant type the overload package is
+unaware of.
 
 =item junk on end of regexp
 
@@ -1845,12 +1846,6 @@ effective uids or gids failed.
 to check the return value of your socket() call?  See
 L<perlfunc/listen>.
 
-=item lstat() on filehandle %s
-
-(W io) You tried to do an lstat on a filehandle.  What did you mean
-by that?  lstat() makes sense only on filenames.  (Perl did a fstat()
-instead on the filehandle.)
-
 =item Lvalue subs returning %s not implemented yet
 
 (F) Due to limitations in the current implementation, array and hash
@@ -2367,8 +2362,8 @@ See also L<perlport> for writing portable code.
 
 =item Odd number of arguments for overload::constant
 
-(W) The call to overload::constant contained an odd number of arguments.
-The arguments should come in pairs.
+(W overload) The call to overload::constant contained an odd number of
+arguments. The arguments should come in pairs.
 
 =item Odd number of elements in anonymous hash
 
@@ -2514,7 +2509,7 @@ reference.
 (P) We popped the context stack to an eval context, and then discovered
 it wasn't an eval context.
 
-=item panic: pp_match
+=item panic: pp_match%s
 
 (P) The internal pp_match() routine was called with invalid operational
 data.
@@ -3300,7 +3295,7 @@ C<can> may break this.
 (W redefine) You redefined a subroutine.  To suppress this warning, say
 
     {
-       no warnings;
+       no warnings 'redefine';
        eval "sub name { ... }";
     }
 
@@ -3670,6 +3665,15 @@ iterating over it, and someone else stuck a message in the stream of
 data Perl expected.  Someone's very confused, or perhaps trying to
 subvert Perl's population of %ENV for nefarious purposes.
 
+=item Unknown warnings category '%s'
+
+(F) An error issued by the C<warnings> pragma. You specified a warnings
+category that is unknown to perl at this point.
+
+Note that if you want to enable a warnings category registered by a module
+(e.g. C<use warnings 'File::Find'>), you must have imported this module
+first.
+
 =item unmatched [ in regex; marked by <-- HERE in m/%s/
 
 (F) The brackets around a character class must match. If you wish to
@@ -4174,7 +4178,10 @@ So put in parentheses to say what you really mean.
 
 =item Wide character in %s
 
-(W utf8) Perl met a wide character (>255) when it wasn't expecting one.
+(W utf8) Perl met a wide character (>255) when it wasn't expecting
+one.  This warning is by default on for I/O (like print) but can be
+turned off by C<no warnings 'utf8';>.  You are supposed to explicitly
+mark the filehandle with an encoding, see L<open> and L<perlfunc/binmode>.
 
 =item write() on closed filehandle %s
 
@@ -4207,6 +4214,11 @@ supported.
 it already went past any symlink you are presumably trying to look for.
 Use a filename instead.
 
+=item You can't use lstat() on a filehandle
+
+(F) You tried to do an lstat on a filehandle. lstat() makes sense only
+on filenames.
+
 =item YOU HAVEN'T DISABLED SET-ID SCRIPTS IN THE KERNEL YET!
 
 (F) And you probably never will, because you probably don't have the