Re: Open3.pm tries to close unopened file handle
[p5sagit/p5-mst-13.2.git] / pod / perldiag.pod
index 4a36443..d08c53a 100644 (file)
@@ -65,11 +65,23 @@ found inside the parentheses.  See L<perlop/Terms and List Operators (Leftward)>
 
 =item %s argument is not a HASH element
 
-(F) The argument to delete() or exists() must be a hash element, such as
+(F) The argument to exists() must be a hash element, such as
 
     $foo{$bar}
     $ref->[12]->{"susie"}
 
+=item %s argument is not a HASH element or slice
+
+(F) The argument to delete() must be either a hash element, such as
+
+    $foo{$bar}
+    $ref->[12]->{"susie"}
+
+or a hash slice, such as
+
+    @foo{$bar, $baz, $xyzzy}
+    @{$ref->[12]}{"susie", "queue"}
+
 =item %s did not return a true value
 
 (F) A required (or used) file must return a true value to indicate that
@@ -252,7 +264,7 @@ dereference it first.  See L<perlfunc/substr>.
 
 (F) You passed a buffer of the wrong size to one of msgctl(), semctl() or
 shmctl().  In C parlance, the correct sizes are, respectively,
-S<sizeof(struct msqid_ds *)>, S<sizeof(struct semid_ds *)> and
+S<sizeof(struct msqid_ds *)>, S<sizeof(struct semid_ds *)>, and
 S<sizeof(struct shmid_ds *)>.
 
 =item Bad associative array
@@ -427,7 +439,7 @@ or other plumbing problems.
 
 =item Can't declare %s in my
 
-(F) Only scalar, array and hash variables may be declared as lexical variables.
+(F) Only scalar, array, and hash variables may be declared as lexical variables.
 They must have ordinary identifiers as names.
 
 =item Can't do inplace edit on %s: %s
@@ -484,7 +496,7 @@ For example, it'd be kind of silly to put a B<-x> on the #! line.
 
 =item Can't exec "%s": %s
 
-(W) An system(), exec() or piped open call could not execute the named
+(W) An system(), exec(), or piped open call could not execute the named
 program for the indicated reason.  Typical reasons include: the permissions
 were wrong on the file, the file wasn't found in C<$ENV{PATH}>, the
 executable in question was compiled for another architecture, or the
@@ -623,7 +635,7 @@ Usually this is because you don't have read permission for the file.
 
 (W) You tried to say C<open(CMD, "|cmd|")>, which is not supported.  You can
 try any of several modules in the Perl library to do this, such as
-"open2.pl".  Alternately, direct the pipe's output to a file using "E<gt>",
+IPC::Open2.  Alternately, direct the pipe's output to a file using "E<gt>",
 and then read it in under a different file handle.
 
 =item Can't open error file %s as stderr
@@ -830,6 +842,11 @@ case it indicates something else.
 (W) You probably said %hash{$key} when you meant $hash{$key} or @hash{@keys}.
 On the other hand, maybe you just meant %hash and got carried away.
 
+=item Died.
+
+(F) You passed die() an empty string (the equivalent of C<die "">) or
+you called it with no args and both C<$@> and C<$_> were empty.
+
 =item Do you need to pre-declare %s?
 
 (S) This is an educated guess made in conjunction with the message "%s
@@ -1241,7 +1258,7 @@ that is less than 0.  This is difficult to imagine.
 (F) You can't quantify a quantifier without intervening parentheses.  So
 things like ** or +* or ?* are illegal.
 
-Note, however, that the minimal matching quantifiers, *?, +? and ?? appear
+Note, however, that the minimal matching quantifiers, C<*?>, C<+?>, and C<??> appear
 to be nested quantifiers, but aren't.  See L<perlre>.
 
 =item No #! line
@@ -2015,7 +2032,7 @@ into Perl yourself.
 
 =item System V IPC is not implemented on this machine
 
-(F) You tried to do something with a function beginning with "sem", "shm"
+(F) You tried to do something with a function beginning with "sem", "shm",
 or "msg".  See L<perlfunc/semctl>, for example.
 
 =item Syswrite on closed filehandle
@@ -2346,6 +2363,11 @@ on the front of your variable.
 of Perl.  Check the E<lt>#!E<gt> line, or manually feed your script
 into Perl yourself.
 
+=item Warning: something's wrong.
+
+(W) You passed warn() an empty string (the equivalent of C<warn "">) or
+you called it with no args and C<$_> was empty.
+
 =item Warning: unable to close filehandle %s properly.
 
 (S) The implicit close() done by an open() got an error indication on the
@@ -2451,7 +2473,7 @@ streams, such as
 =item Got an error from DosAllocMem:
 
 (P) An error peculiar to OS/2. Most probably you use an obsolete version
-of perl, and should not happen anyway.
+of perl, and this should not happen anyway.
 
 =item Malformed PERLLIB_PREFIX