Integrate mainline.
[p5sagit/p5-mst-13.2.git] / pod / perldiag.pod
index f57fbc0..8a2e4a4 100644 (file)
@@ -49,7 +49,7 @@ letter.
 (W) When using threaded Perl, a thread (not necessarily the main
 thread) exited while there were still other threads running.
 Usually it's a good idea to first collect the return values of the
-created threads by joining them, and only then exit from then main
+created threads by joining them, and only then exit from the main
 thread.  See L<threads>.
 
 =item accept() on closed socket %s
@@ -1498,13 +1498,25 @@ PDP-11 or something?
 to be a read-write filehandle, you needed to open it with "+<" or "+>"
 or "+>>" instead of with "<" or nothing.  If you intended only to write
 the file, use ">" or ">>".  See L<perlfunc/open>.
+The warning will also occur if STDOUT (file descriptor 1) or STDERR
+(file descriptor 2) is opened for input, this is a pre-emptive warning in
+case some other part of your program or a child process is expecting STDOUT
+and STDERR to be writable. This can happen accidentally if you
+C<close(STDOUT)> or STDERR and then C<open> an unrelated handle which
+will resuse the lowest numbered available descriptor.
 
 =item Filehandle %s opened only for output
 
-(W io) You tried to read from a filehandle opened only for writing.  If
-you intended it to be a read/write filehandle, you needed to open it
+(W io) You tried to read from a filehandle opened only for writing.
+If you intended it to be a read/write filehandle, you needed to open it
 with "+<" or "+>" or "+>>" instead of with "<" or nothing.  If you
 intended only to read from the file, use "<".  See L<perlfunc/open>.
+The warning will also occur if STDIN (file descriptor 0) is opened
+for output - this is a pre-emptive warning in case some other part of your
+program or a child process is expecting STDIN to be readable.
+This can happen accidentally if you C<close(STDIN)> and then C<open> an
+unrelated handle which will resuse the lowest numbered available
+descriptor.
 
 =item Final $ should be \$ or $name
 
@@ -3017,7 +3029,7 @@ declared or defined with a different function prototype.
 
 =item Prototype not terminated
 
-(F) You've omitted the closing parenthesis in a function prototype 
+(F) You've omitted the closing parenthesis in a function prototype
 definition.
 
 =item Quantifier in {,} bigger than %d in regex;
@@ -4154,7 +4166,7 @@ a package qualifier, e.g. C<&our()>, or C<Foo::our()>.
 
 =item Use of tainted arguments in %s is deprecated
 
-(W taint) You have supplied C<system()> or C<exec()> with multiple 
+(W taint, deprecated) You have supplied C<system()> or C<exec()> with multiple
 arguments and at least one of them is tainted.  This used to be allowed
 but will become a fatal error in a future version of perl.  Untaint your
 arguments.  See L<perlsec>.