X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperldiag.pod;h=10b77c9c532af76b9633b0a3e02b5ba528852d43;hb=0111df86b68202837d8ca044a27bbc00d7895fb1;hp=5a9eb4e335df08b0e46980ba23c5434bce640a5b;hpb=25f58aea15b072f74afcee1b9074d33e8e7348b5;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 5a9eb4e..10b77c9 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -44,6 +44,14 @@ letter. =over 4 +=item A thread exited while %d other threads were still running + +(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 +thread. See L. + =item accept() on closed socket %s (W closed) You tried to do an accept on a closed socket. Did you forget @@ -182,10 +190,26 @@ spots. This is now heavily deprecated. must either both be scalars or both be lists. Otherwise Perl won't know which context to supply to the right side. -=item Negative offset to vec in lvalue context +=item Attempt to access disallowed key '%s' in a restricted hash -(F) When C is called in an lvalue context, the second argument must be -greater than or equal to zero. +(F) The failing code has attempted to get or set a key which is not in +the current set of allowed keys of a restricted hash. + +=item Attempt to clear a restricted hash + +(F) It is currently not allowed to clear a restricted hash, even if the +new hash would contain the same keys as before. This may change in +the future. + +=item Attempt to delete readonly key '%s' from a restricted hash + +(F) The failing code attempted to delete a key whose value has been +declared readonly from a restricted hash. + +=item Attempt to delete disallowed key '%s' from a restricted hash + +(F) The failing code attempted to delete from a restricted hash a key +which is not in its key set. =item Attempt to bless into a reference @@ -261,7 +285,7 @@ avoid this warning. used as an lvalue, which is pretty strange. Perhaps you forgot to dereference it first. See L. -=item Bad arg length for %s, is %d, should be %d +=item Bad arg length for %s, is %d, should be %s (F) You passed a buffer of the wrong size to one of msgctl(), semctl() or shmctl(). In C parlance, the correct sizes are, respectively, @@ -536,9 +560,9 @@ quotas or other plumbing problems. =item Can't declare class for non-scalar %s in "%s" -(S) Currently, only scalar variables can declared with a specific class -qualifier in a "my" or "our" declaration. The semantics may be extended -for other types of variables in future. +(F) Currently, only scalar variables can be declared with a specific +class qualifier in a "my" or "our" declaration. The semantics may be +extended for other types of variables in future. =item Can't declare %s in "%s" @@ -604,7 +628,7 @@ line. =item Can't exec "%s": %s -(W exec) An system(), exec(), or piped open call could not execute the +(W exec) A 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 @@ -666,7 +690,9 @@ editor will have a way to help you find these characters. =item Can't find %s property definition %s (F) You may have tried to use C<\p> which means a Unicode property for -example \p{Lu} is all uppercase letters. Escape the C<\p>, either +example \p{Lu} is all uppercase letters. if you did mean to use a +Unicode property, see L for the list of known properties. +If you didn't mean to use a Unicode property, escape the C<\p>, either C<\\p> (just the C<\p>) or by C<\Q\p> (the rest of the string, until possible C<\E>). @@ -791,6 +817,11 @@ the file, say, by doing C. functioning as a class, but that package doesn't define that particular method, nor does any of its base classes. See L. +=item Can't locate PerlIO%s + +(F) You tried to use in open() a PerlIO layer that does not exist, +e.g. open(FH, ">:nosuchlayer", "somefile"). + =item (perhaps you forgot to load "%s"?) (F) This is an educated guess made in conjunction with the message @@ -844,6 +875,16 @@ switches, or explicitly, failed for the indicated reason. Usually this is because you don't have read permission for a file which you named on the command line. +=item Can't open a reference + +(W io) You tried to open a scalar reference for reading or writing, +using the 3-arg open() syntax : + + open FH, '>', $ref; + +but your version of perl is compiled without perlio, and this form of +open is not supported. + =item Can't open bidirectional pipe (W pipe) You tried to say C, which is not supported. @@ -1133,6 +1174,29 @@ in the regular expression engine; or rewriting the regular expression so that it is simpler or backtracks less. (See L for information on I.) +=item cond_broadcast() called on unlocked variable + +(W threads) Within a thread-enabled program, you tried to call +cond_broadcast() on a variable which wasn't locked. The cond_broadcast() +function is used to wake up another thread that is waiting in a +cond_wait(). To ensure that the signal isn't sent before the other thread +has a chance to enter the wait, it is usual for the signaling thread to +first wait for a lock on variable. This lock attempt will only succeed +after the other thread has entered cond_wait() and thus relinquished the +lock. + + +=item cond_signal() called on unlocked variable + +(W threads) Within a thread-enabled program, you tried to call +cond_signal() on a variable which wasn't locked. The cond_signal() +function is used to wake up another thread that is waiting in a +cond_wait(). To ensure that the signal isn't sent before the other thread +has a chance to enter the wait, it is usual for the signaling thread to +first wait for a lock on variable. This lock attempt will only succeed +after the other thread has entered cond_wait() and thus relinquished the +lock. + =item connect() on closed socket %s (W closed) You tried to do a connect on a closed socket. Did you forget @@ -1157,7 +1221,7 @@ See L and L. =item Constant subroutine %s redefined -(S|W redefine) You redefined a subroutine which had previously been +(S) You redefined a subroutine which had previously been eligible for inlining. See L for commentary and workarounds. @@ -1220,6 +1284,11 @@ array is empty, just use C for example. checks for an undefined I value. If you want to see if the hash is empty, just use C for example. +=item %s defines neither package nor VERSION--version check failed + +(F) You said something like "use Module 42" but in the Module file +there are neither package declarations nor a C<$VERSION>. + =item Delimiter for here document is too long (F) In a here document construct like C<<, the label C is too @@ -1263,6 +1332,11 @@ you called it with no args and both C<$@> and C<$_> were empty. See Server error. +=item %s does not define %s::VERSION--version check failed + +(F) You said something like "use Module 42" but the Module did not +define a C<$VERSION.> + =item Don't know how to handle magic of type '%s' (P) The internal handling of magical variables has been cursed. @@ -1282,6 +1356,11 @@ something that isn't defined yet, you don't actually have to define the subroutine or package before the current location. You can use an empty "sub foo;" or "package FOO;" to enter a "forward" declaration. +=item dump() better written as CORE::dump() + +(W misc) You used the obsolescent C built-in function, without fully +qualifying it as C. Maybe it's a typo. See L. + =item Duplicate free() ignored (S malloc) An internal routine called free() on something that had @@ -1294,6 +1373,12 @@ Your code will be interpreted as an attempt to call a method named "elseif" for the class returned by the following block. This is unlikely to be what you want. +=item Empty %s + +(F) C<\p> and C<\P> are used to introduce a named Unicode property, as +described in L and L. You used C<\p> or C<\P> in +a regular expression without specifying the property name. + =item entering effective %s failed (F) While under the C pragma, switching the real and @@ -1335,6 +1420,10 @@ Perl identifier. If you're just trying to glob a long list of filenames, try using the glob() operator, or put the filenames into a variable and glob that. +=item exec? I'm not *that* kind of operating system + +(F) The C function is not implemented in MacPerl. See L. + =item Execution of %s aborted due to compilation errors (F) The final summary message when a Perl compilation fails. @@ -1346,7 +1435,7 @@ goto, or a loop control statement. =item Exiting format via %s -(W exiting) You are exiting an eval by unconventional means, such as a +(W exiting) You are exiting a format by unconventional means, such as a goto, or a loop control statement. =item Exiting pseudo-block via %s @@ -1456,7 +1545,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 =..."; } @@ -1543,6 +1632,11 @@ version of Perl, and this should not happen anyway. (F) Unlike with "next" or "last", you're not allowed to goto an unspecified destination. See L. +=item %s-group starts with a count + +(F) In pack/unpack a ()-group started with a count. A count is +supposed to follow something: a template character or a ()-group. + =item %s had compilation errors (F) The final summary message when a C fails. @@ -1594,6 +1688,11 @@ when Perl was built using standard options. For some reason, your version of Perl appears to have been built without this support. Talk to your Perl administrator. +=item Illegal character in prototype for %s : %s + +(W syntax) An illegal character was found in a prototype declaration. Legal +characters in prototypes are $, @, %, *, ;, [, ], &, and \. + =item Illegal division by zero (F) You tried to divide a number by 0. Either something was wrong in @@ -1618,17 +1717,17 @@ two from 1 to 32 (or 64, if your platform supports that). =item Illegal octal digit %s -(F) You used an 8 or 9 in a octal number. +(F) You used an 8 or 9 in an octal number. =item Illegal octal digit %s ignored -(W digit) You may have tried to use an 8 or 9 in a octal number. +(W digit) You may have tried to use an 8 or 9 in an octal number. Interpretation of the octal number stopped before the 8 or 9. =item Illegal switch in PERL5OPT: %s (X) The PERL5OPT environment variable may only be used to set the -following switches: B<-[DIMUdmw]>. +following switches: B<-[DIMUdmtw]>. =item Ill-formed CRTL environ value "%s" @@ -1654,6 +1753,12 @@ would otherwise result in the same message being repeated. Failure of user callbacks dispatched using the C flag could also result in this warning. See L. +=item In EBCDIC the v-string components cannot exceed 2147483647 + +(F) An error peculiar to EBCDIC. Internally, v-strings are stored as +Unicode code points, and encoded in EBCDIC as UTF-EBCDIC. The UTF-EBCDIC +encoding is limited to code points no larger than 2147483647 (0x7FFFFFFF). + =item Insecure dependency in %s (F) You tried to do something that the tainting mechanism didn't like. @@ -1696,7 +1801,6 @@ operations. The <-- HERE shows in the regular expression about where the problem was discovered. - =item Internal inconsistency in tracking vforks (S) A warning peculiar to VMS. Perl keeps track of the number of times @@ -1712,7 +1816,6 @@ terminate the Perl script and execute the specified command. <-- HERE shows in the regular expression about where the problem was discovered. - =item %s (...) interpreted as function (W syntax) You've run afoul of the rule that says that any list operator @@ -1785,13 +1888,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 @@ -1828,7 +1932,7 @@ L. =item lstat() on filehandle %s -(W io) You tried to do a lstat on a filehandle. What did you mean +(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.) @@ -1853,7 +1957,6 @@ shows in the regular expression about where the problem was discovered. prefix1;prefix2 or - prefix1 prefix2 with nonempty prefix1 and prefix2. If C is indeed a prefix of @@ -1861,10 +1964,21 @@ a builtin library search path, prefix2 is substituted. The error may appear if components are not found, or are too long. See "PERLLIB_PREFIX" in L. +=item Malformed prototype for %s: %s + +(F) You tried to use a function with a malformed prototype. The +syntax of function prototypes is given a brief compile-time check for +obvious errors like invalid characters. A more rigorous check is run +when the function is called. + =item Malformed UTF-8 character (%s) Perl detected something that didn't comply with UTF-8 encoding rules. +One possible cause is that you read in data that you thought to be in +UTF-8 but it wasn't (it was for example legacy 8-bit data). Another +possibility is careless use of utf8::upgrade(). + =item Malformed UTF-16 surrogate Perl thought it was reading UTF-16 encoded character data but while @@ -1943,6 +2057,10 @@ can vary from one line to the next. (S) This is an educated guess made in conjunction with the message "%s found where operator expected". Often the missing operator is a comma. +=item Missing right brace on %s + +(F) Missing right brace in C<\p{...}> or C<\P{...}>. + =item Missing right curly or square bracket (F) The lexer counted more opening curly or square brackets than closing @@ -1995,6 +2113,13 @@ couldn't be created for some peculiar reason. you omitted the name of the module. Consult L for full details about C<-M> and C<-m>. +=item More than one argument to open + +(F) The C function has been asked to open multiple files. This +can happen if you are trying to open a pipe to a command that takes a +list of arguments, but have forgotten to specify a piped open mode. +See L for details. + =item msg%s not implemented (F) You don't have System V message IPC on your system. @@ -2044,6 +2169,11 @@ provided for this purpose. (F) You tried to do a read/write/send/recv operation with a buffer length that is less than 0. This is difficult to imagine. +=item Negative offset to vec in lvalue context + +(F) When C is called in an lvalue context, the second argument must be +greater than or equal to zero. + =item Nested quantifiers in regex; marked by <-- HERE in m/%s/ (F) You can't quantify a quantifier without intervening parentheses. So @@ -2178,6 +2308,11 @@ immediately after the switch, without intervening spaces. (F) The indicated command line switch needs a mandatory argument, but you haven't specified one. +=item No such class %s + +(F) You provided a class qualifier in a "my" or "our" declaration, but +this class doesn't exist at this point in your program. + =item No such pipe open (P) An error peculiar to VMS. The internal routine my_pclose() tried to @@ -2273,6 +2408,12 @@ supplied. See L. of Perl. Check the #! line, or manually feed your script into Perl yourself. +=item %s not allowed in length fields + +(F) The count in the (un)pack template may be replaced by C<[TEMPLATE]> only if +C