X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperldiag.pod;h=646355fe81cd4437d097001a307d5e1876d85258;hb=04f720db660f11635846523a2f8eb8c7ddebb221;hp=0084f9c6da80f7911814f8329902f4b206126419;hpb=697943021785eb8447e25eb51a6f27fd78921863;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 0084f9c..646355f 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -56,6 +56,31 @@ no useful value. See L. (F) The '!' is allowed in pack() and unpack() only after certain types. See L. +=item # cannot take a count + +(F) You had an unpack template indicating a counted-length string, +but you have also specified an explicit size for the string. +See L. + +=item # must be followed by a, A or Z + +(F) You had an unpack template indicating a counted-length string, +which must be followed by one of the letters a, A or Z +to indicate what sort of string is to be unpacked. +See L. + +=item # must be followed by a*, A* or Z* + +(F) You had an pack template indicating a counted-length string, +Currently the only things that can have their length counted are a*, A* or Z*. +See L. + +=item # must follow a numeric type + +(F) You had an unpack template that contained a '#', +but this did not follow some numeric unpack specification. +See L. + =item % may only be used in unpack (F) You can't pack a string by supplying a checksum, because the @@ -74,6 +99,16 @@ C<'>-delimited regular expression. by parentheses turns into a function, with all the list operators arguments found inside the parentheses. See L. +=item %s() called too early to check prototype + +(W) You've called a function that has a prototype before the parser saw a +definition or declaration for it, and Perl could not check that the call +conforms to the prototype. You need to either add an early prototype +declaration for the subroutine in question, or move the subroutine +definition ahead of the call to get proper prototype checking. Alternatively, +if you are certain that you're calling the function correctly, you may put +an ampersand before the name to avoid the warning. See L. + =item %s argument is not a HASH element (F) The argument to exists() must be a hash element, such as @@ -317,6 +352,12 @@ could indicate that SvREFCNT_dec() was called too many times, or that SvREFCNT_inc() was called too few times, or that the SV was mortalized when it shouldn't have been, or that memory has been corrupted. +=item Attempt to join self + +(F) You tried to join a thread from within itself, which is an +impossible task. You may be joining the wrong thread, or you may +need to move the join() to some other thread. + =item Attempt to pack pointer to temporary value (W) You tried to pass a temporary value (like the result of a @@ -1000,6 +1041,17 @@ there is no builtin with the name C. opposed to a subroutine reference): no such method callable via the package. If method name is C, this is an internal error. +=item Character class [:%s:] unknown + +(F) The class in the character class [: :] syntax is unknown. + +=item Character class syntax [%s] belongs inside character classes + +(W) The character class constructs [: :], [= =], and [. .] go +I character classes, the [] are part of the construct, +for example: /[012[:alpha:]345]/. Note that the last two constructs +are not currently implemented, they are placeholders for future extensions. + =item Character class syntax [. .] is reserved for future extensions (W) Within regular expression character classes ([]) the syntax beginning @@ -1008,14 +1060,6 @@ If you need to represent those character sequences inside a regular expression character class, just quote the square brackets with the backslash: "\[." and ".\]". -=item Character class syntax [: :] is reserved for future extensions - -(W) Within regular expression character classes ([]) the syntax beginning -with "[:" and ending with ":]" is reserved for future extensions. -If you need to represent those character sequences inside a regular -expression character class, just quote the square brackets with the -backslash: "\[:" and ":\]". - =item Character class syntax [= =] is reserved for future extensions (W) Within regular expression character classes ([]) the syntax @@ -1105,13 +1149,13 @@ times more than it has returned. This probably indicates an infinite recursion, unless you're writing strange benchmark programs, in which case it indicates something else. -=item defined(@array) is deprecated (and not really meaningful) +=item defined(@array) is deprecated (D) defined() is not usually useful on arrays because it checks for an undefined I value. If you want to see if the array is empty, just use C for example. -=item defined(%hash) is deprecated (and not really meaningful) +=item defined(%hash) is deprecated (D) defined() is not usually useful on hashes because it checks for an undefined I value. If you want to see if the hash is empty, @@ -1265,7 +1309,7 @@ PDP-11 or something? You need to do an open() or a socket() call, or call a constructor from the FileHandle package. -=item Filehandle %s opened for only input +=item Filehandle %s opened only for input (W) You tried to write on a read-only filehandle. If you intended it to be a read-write filehandle, you needed to open it with @@ -1273,12 +1317,12 @@ intended it to be a read-write filehandle, you needed to open it with you intended only to write the file, use "E" or "EE". See L. -=item Filehandle opened for only input +=item Filehandle %s opened only for output -(W) You tried to write on a read-only filehandle. If you +(W) 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 "+E" or "+E" or "+EE" instead of with "E" or nothing. If -you intended only to write the file, use "E" or "EE". See +you intended only to read from the file, use "E". See L. =item Final $ should be \$ or $name @@ -1300,7 +1344,7 @@ the name. (W) You redefined a format. To suppress this warning, say { - local $^W = 0; + no warning; eval "format NAME =..."; } @@ -1437,7 +1481,7 @@ Interpretation of the binary number stopped before the offending digit. (W) You may have tried to use an 8 or 9 in a octal number. Interpretation of the octal number stopped before the 8 or 9. -=item Illegal hex digit %s ignored +=item Illegal hexadecimal digit %s ignored (W) You may have tried to use a character other than 0 - 9 or A - F in a hexadecimal number. Interpretation of the hexadecimal number stopped @@ -1484,8 +1528,8 @@ known value, using trustworthy data. See L. =item Integer overflow in %s number -(S) The literal hex, octal or binary number you have specified is -too big for your architecture. On a 32-bit architecture the largest +(S) The literal hexadecimal, octal or binary number you have specified +is too big for your architecture. On a 32-bit architecture the largest literal hex, octal or binary number representable without overflow is 0xFFFFFFFF, 037777777777, or 0b11111111111111111111111111111111 respectively. Note that Perl transparently promotes decimal literals @@ -2274,7 +2318,7 @@ are outside the range which can be represented by integers internally. One possible workaround is to force Perl to use magical string increment by prepending "0" to your numbers. -=item Read on closed filehandle E%sE +=item Read on closed filehandle %s (W) The filehandle you're reading from got itself closed sometime before now. Check your logic flow. @@ -2552,7 +2596,7 @@ may break this. (W) You redefined a subroutine. To suppress this warning, say { - local $^W = 0; + no warning; eval "sub name { ... }"; } @@ -2846,6 +2890,12 @@ representative, who probably put it there in the first place. (F) There are no byte-swapping functions for a machine with this byte order. +=item Unknown open() mode '%s' + +(F) The second argument of 3-arguments open is not one from the list +of C>, C>, CE>, C<+L>, C<+L>, +C<+EE>, C<-|>, C<|-> of possible open() modes. + =item Unknown process %x sent message to prime_env_iter: %s (P) An error peculiar to VMS. Perl was reading values for %ENV before @@ -3169,7 +3219,7 @@ but in actual fact, you got So put in parentheses to say what you really mean. -=item Write on closed filehandle +=item Write on closed filehandle %s (W) The filehandle you're writing to got itself closed sometime before now. Check your logic flow.