X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperldiag.pod;h=1b4ab09c1ae1fca375b2cfbd3cae91890c1454f7;hb=4e9dada01dea61250de18f52c49ec01866133705;hp=a416b5a3b839a8e7b014894da0cfcfacbcf7144d;hpb=91c549175fa6d9c1a6279d23a256266b7fbe4be9;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perldiag.pod b/pod/perldiag.pod index a416b5a..1b4ab09 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -44,14 +44,6 @@ 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 @@ -62,10 +54,10 @@ L. (X) You can't allocate more than 64K on an MS-DOS machine. -=item '!' allowed only after types %s +=item '%c' allowed only after types %s -(F) The '!' is allowed in pack() and unpack() only after certain types. -See L. +(F) The modifiers '!', '<' and '>' are allowed in pack() or unpack() only +after certain types. See L. =item Ambiguous call resolved as CORE::%s(), qualify as such or use & @@ -171,6 +163,15 @@ error. that expected a numeric value instead. If you're fortunate the message will identify which operator was so unfortunate. +=item Argument list not closed for PerlIO layer "%s" + +(W layer) When pushing a layer with arguments onto the Perl I/O system you +forgot the ) that closes the argument list. (Layers take care of transforming +data between external and internal representations.) Perl stopped parsing +the layer list at this point and did not attempt to push this layer. +If your program didn't explicitly request the failing operation, it may be +the result of the value of the environment variable PERLIO. + =item Array @%s missing the @ in argument %d of %s() (D deprecated) Really old Perl let you omit the @ on array names in some @@ -190,27 +191,19 @@ 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 A thread exited while %d threads were 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 the main +thread. See L. + =item Attempt to access disallowed key '%s' in a restricted hash (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 (F) The CLASSNAME argument to the bless() operator is expected to be @@ -229,6 +222,16 @@ example by: bless $self, "$proto"; +=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 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 free non-arena SV: 0x%lx (P internal) All SV objects are supposed to be allocated from arenas @@ -318,12 +321,6 @@ which is left unnoticed if C uses I system malloc(). (P) One of the internal hash routines was passed a null HV pointer. -=item Bad index while coercing array into hash - -(F) The index looked up in the hash found as the 0'th element of a -pseudo-hash is not legal. Index values must be at 1 or greater. -See L. - =item Badly placed ()'s (A) You've accidentally run your script through B instead @@ -440,11 +437,6 @@ Check you control flow and number of arguments. (P) Perl detected an attempt to copy an internal value that is not copyable. -=item B<-P> not allowed for setuid/setgid script - -(F) The script would have to be opened by the C preprocessor by name, -which provides a race condition that breaks security. - =item Buffer overflow in prime_env_iter: %s (W internal) A warning peculiar to VMS. While Perl was preparing to @@ -467,11 +459,23 @@ 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 / cannot take a count +=item Cannot compress integer in pack -(F) You had an unpack template indicating a counted-length string, but -you have also specified an explicit size for the string. See -L. +(F) An argument to pack("w",...) was too large to compress. The BER +compressed integer format can only be used with positive integers, and you +attempted to compress Infinity or a very large number (> 1e308). +See L. + +=item Cannot compress negative numbers in pack + +(F) An argument to pack("w",...) was negative. The BER compressed integer +format can only be used with positive integers. See L. + +=item Can only compress unsigned integers in pack + +(F) An argument to pack("w",...) was not an integer. The BER compressed +integer format can only be used with positive integers, and you attempted +to compress something else. See L. =item Can't bless non-reference value @@ -626,6 +630,13 @@ waitpid() without flags is emulated. point. For example, it'd be kind of silly to put a B<-x> on the #! line. +=item Can't %s %s-endian %ss on this platform + +(F) Your platform's byte-order is neither big-endian nor little-endian, +or it has a very strange pointer size. Packing and unpacking big- or +little-endian floating point values and pointers may not be possible. +See L. + =item Can't exec "%s": %s (W exec) A system(), exec(), or piped open call could not execute the @@ -675,6 +686,15 @@ found in the PATH. found in the PATH, or at least not with the correct permissions. The script exists in the current directory, but PATH prohibits running it. +=item Can't find %s property definition %s + +(F) You may have tried to use C<\p> which means a Unicode property (for +example C<\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 +by C<\\p> (just the C<\p>) or by C<\Q\p> (the rest of the string, until +possible C<\E>). + =item Can't find string terminator %s anywhere before EOF (F) Perl strings can stretch over multiple lines. This message means @@ -687,15 +707,6 @@ If you're getting this error from a here-document, you may have included unseen whitespace before or after your closing tag. A good programmer's 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. 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>). - =item Can't fork (F) A fatal error occurred while trying to fork while opening a @@ -773,6 +784,16 @@ usually double the curlies to get the same effect though, because the inner curlies will be considered a block that loops once. See L. +=item Can't load '%s' for module %s + +(F) The module you tried to load failed to load a dynamic extension. This +may either mean that you upgraded your version of perl to one that is +incompatible with your old dynamic extensions (which is known to happen +between major versions of perl), or (more likely) that your dynamic +extension was built against an older version of the library that is +installed on your system. You may need to rebuild your old dynamic +extensions. + =item Can't localize lexical variable %s (F) You used local on a variable name that was previously declared as a @@ -780,13 +801,6 @@ lexical variable using "my". This is not allowed. If you want to localize a package variable of the same name, qualify it with the package name. -=item Can't localize pseudo-hash element - -(F) You said something like C<< local $ar->{'key'} >>, where $ar is a -reference to a pseudo-hash. That hasn't been implemented yet, but you -can get a similar effect by localizing the corresponding array element -directly -- C<< local $ar->[$ar->[0]{'key'}] >>. - =item Can't localize through a reference (F) You said something like C, which Perl can't currently @@ -811,28 +825,28 @@ autoload, but there is no function to autoload. Most probable causes are a misprint in a function/method name or a failure to C the file, say, by doing C. +=item Can't locate loadable object for module %s in @INC + +(F) The module you loaded is trying to load an external library, like +for example, C or C, but the L module was +unable to locate this library. See L. + =item Can't locate object method "%s" via package "%s" (F) You called a method correctly, and it correctly indicated a package 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 -"Can't locate object method \"%s\" via package \"%s\"". It often means -that a method requires a package that has not been loaded. - =item Can't locate package %s for @%s::ISA (W syntax) The @ISA array contained the name of another package that doesn't seem to exist. +=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 Can't make list assignment to \%ENV on this system (F) List assignment to %ENV is not supported on some systems, notably @@ -916,10 +930,14 @@ the command line for writing. redirection, and couldn't open the pipe into which to send data destined for stdout. -=item Can't open perl script%s: %s +=item Can't open perl script%s (F) The script you specified can't be opened for the indicated reason. +If you're debugging a script that uses #!, and normally relies on the +shell's $PATH search, the -S option causes perl to do that search, so +you don't have to type the path or C<`which $scriptname`>. + =item Can't read CRTL environ (S) A warning peculiar to VMS. Perl tried to read an element of %ENV @@ -977,6 +995,11 @@ suidperl. temporary or readonly values) from a subroutine used as an lvalue. This is not allowed. +=item Can't return outside a subroutine + +(F) The return statement was executed in mainline code, that is, where +there was no subroutine call to return out of. See L. + =item Can't return %s to lvalue scalar context (F) You tried to return a complete array or hash from an lvalue subroutine, @@ -985,11 +1008,6 @@ to return only one value. You probably meant to write parentheses around the call to the subroutine, which tell Perl that the call should be in list context. -=item Can't return outside a subroutine - -(F) The return statement was executed in mainline code, that is, where -there was no subroutine call to return out of. See L. - =item Can't stat script "%s" (P) For some reason you can't fstat() the script even though you have it @@ -1037,17 +1055,17 @@ indicates that such a conversion was attempted. upgradability. Upgrading to undef indicates an error in the code calling sv_upgrade. -=item Can't use an undefined value as %s reference - -(F) A value used as either a hard reference or a symbolic reference must -be a defined value. This helps to delurk some insidious errors. - =item Can't use anonymous symbol table for method lookup -(P) The internal routine that does method lookup was handed a symbol +(F) The internal routine that does method lookup was handed a symbol table that doesn't have a name. Symbol tables can become anonymous for example by undefining stashes: C. +=item Can't use an undefined value as %s reference + +(F) A value used as either a hard reference or a symbolic reference must +be a defined value. This helps to delurk some insidious errors. + =item Can't use bareword ("%s") as %s ref while "strict refs" in use (F) Only hard references are allowed by "strict refs". Symbolic @@ -1059,6 +1077,12 @@ references are disallowed. See L. Errno.pm module. The Errno module is expected to tie the %! hash to provide symbolic names for C<$!> errno values. +=item Can't use both '<' and '>' after type '%c' in %s + +(F) A type cannot be forced to have both big-endian and little-endian +byte-order at the same time, so this combination of modifiers is not +allowed. See L. + =item Can't use %s for loop variable (F) Only a simple scalar variable may be used as a loop variable on a @@ -1072,6 +1096,13 @@ is not allowed, because the magic can be tied to only one location have variables in your program that looked like magical variables but weren't. +=item Can't use '%c' in a group with different byte-order in %s + +(F) You attempted to force a different byte-order on a type +that is already inside a group with a byte-order modifier. +For example you cannot force little-endianness on a type that +is inside a big-endian group. + =item Can't use "my %s" in sort comparison (F) The global variables $a and $b are reserved for sort comparisons. @@ -1117,7 +1148,7 @@ references can be weakened. with an assignment operator, which implies modifying the value itself. Perhaps you need to copy the value to a temporary, and repeat that. -=item Character in "C" format wrapped +=item Character in "C" format wrapped in pack (W pack) You said @@ -1132,7 +1163,7 @@ and so on) and not for Unicode characters, so Perl behaved as if you meant If you actually want to pack Unicode codepoints, use the C<"U"> format instead. -=item Character in "c" format wrapped +=item Character in "c" format wrapped in pack (W pack) You said @@ -1151,6 +1182,11 @@ instead. (W unopened) You tried to close a filehandle that was never opened. +=item Code missing after '/' + +(F) You had a (sub-)template that ends with a '/'. There must be another +template code following the slash. See L. + =item %s: Command not found (A) You've accidentally run your script through B instead of Perl. @@ -1185,7 +1221,6 @@ 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 @@ -1254,16 +1289,11 @@ valid magic number. (P) The malloc package that comes with Perl had an internal failure. -=item C<-p> destination: %s - -(F) An error occurred during the implicit output invoked by the C<-p> -command-line switch. (This output goes to STDOUT unless you've -redirected it with select().) - -=item C<-T> and C<-B> not implemented on filehandles +=item Count after length/code in unpack -(F) Perl can't peek at the stdio buffer of filehandles when it doesn't -know about your kind of stdio. You'll have to use a filename instead. +(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 Deep recursion on subroutine "%s" @@ -1295,6 +1325,28 @@ there are neither package declarations nor a C<$VERSION>. long for Perl to handle. You have to be seriously twisted to write code that triggers this error. +=item Deprecated use of my() in false conditional + +(D deprecated) You used a declaration similar to C. +There has been a long-standing bug in Perl that causes a lexical variable +not to be cleared at scope exit when its declaration includes a false +conditional. Some people have exploited this bug to achieve a kind of +static variable. Since we intend to fix this bug, we don't want people +relying on this behavior. You can achieve a similar static effect by +declaring the variable in a separate block outside the function, eg + + sub f { my $x if 0; return $x++ } + +becomes + + { my $x; sub f { return $x++ } } + +=item DESTROY created new reference to dead object '%s' + +(F) A DESTROY() method created a new reference to the object which is +just being DESTROYed. Perl is confused, and prefers to abort rather than +to create a dangling reference. + =item Did not produce a valid header See Server error. @@ -1337,6 +1389,11 @@ See Server error. (F) You said something like "use Module 42" but the Module did not define a C<$VERSION.> +=item '/' does not take a repeat count + +(F) You cannot put a repeat count of any kind right after the '/' code. +See L. + =item Don't know how to handle magic of type '%s' (P) The internal handling of magical variables has been cursed. @@ -1347,8 +1404,8 @@ define a C<$VERSION.> =item (Do you need to predeclare %s?) -(S) This is an educated guess made in conjunction with the message "%s -found where operator expected". It often means a subroutine or module +(S syntax) This is an educated guess made in conjunction with the message +"%s found where operator expected". It often means a subroutine or module name is being referenced that hasn't been declared yet. This may be because of ordering problems in your file, or because of a missing "sub", "package", "require", or "use" statement. If you're referencing @@ -1366,10 +1423,15 @@ qualifying it as C. Maybe it's a typo. See L. (S malloc) An internal routine called free() on something that had already been freed. +=item Duplicate modifier '%c' after '%c' in %s + +(W) You have applied the same modifier more than once after a type +in a pack template. See L. + =item elseif should be elsif -(S) There is no keyword "elseif" in Perl because Larry thinks it's ugly. -Your code will be interpreted as an attempt to call a method named +(S syntax) There is no keyword "elseif" in Perl because Larry thinks it's +ugly. 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. @@ -1384,6 +1446,12 @@ a regular expression without specifying the property name. (F) While under the C pragma, switching the real and effective uids or gids failed. +=item %ENV is aliased to %s + +(F) You're running under taint mode, and the C<%ENV> variable has been +aliased to another hash, so it doesn't reflect anymore the state of the +program's environment. This is potentially insecure. + =item Error converting file specification %s (F) An error peculiar to VMS. Because Perl may have to deal with file @@ -1435,7 +1503,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 @@ -1494,17 +1562,30 @@ PDP-11 or something? =item Filehandle %s opened only for input -(W io) 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 "+<" or "+>" -or "+>>" instead of with "<" or nothing. If you intended only to write -the file, use ">" or ">>". See L. +(W io) 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 "+<" or +"+>" or "+>>" instead of with "<" or nothing. If you intended only to +write the file, use ">" or ">>". See L. =item Filehandle %s opened only for output -(W io) You tried to read from a filehandle opened only for writing. If +(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. +Another possibility is that you attempted to open filedescriptor 0 +(also known as STDIN) for output (maybe you closed STDIN earlier?). + +=item Filehandle %s reopened as %s only for input + +(W io) You opened for reading a filehandle that got the same filehandle id +as STDOUT or STDERR. This occured because you closed STDOUT or STDERR +previously. + +=item Filehandle STDIN reopened as %s only for output + +(W io) You opened for writing a filehandle that got the same filehandle id +as STDIN. This occured because you closed STDIN previously. =item Final $ should be \$ or $name @@ -1513,13 +1594,6 @@ a literal dollar sign, or was meant to introduce a variable name that happens to be missing. So you have to put either the backslash or the name. -=item Final @ should be \@ or @name - -(F) You must now decide whether the final @ in a string was meant to be -a literal "at" sign, or was meant to introduce a variable name that -happens to be missing. So you have to put either the backslash or the -name. - =item flock() on closed filehandle %s (W closed) The filehandle you're attempting to flock() got itself closed @@ -1527,14 +1601,6 @@ some time before now. Check your control flow. flock() operates on filehandles. Are you attempting to call flock() on a dirhandle by the same name? -=item Quantifier follows nothing in regex; - -marked by <-- HERE in m/%s/ - -(F) You started a regular expression with a quantifier. Backslash it if you -meant it literally. The <-- HERE shows in the regular expression about -where the problem was discovered. See L. - =item Format not terminated (F) A format must be terminated by a line with a solitary dot. Perl got @@ -1563,8 +1629,8 @@ when you meant =item %s found where operator expected -(S) The Perl lexer knows whether to expect a term or an operator. If it -sees what it knows to be a term when it was expecting to see an +(S syntax) The Perl lexer knows whether to expect a term or an operator. +If it sees what it knows to be a term when it was expecting to see an operator, it gives you this warning. Usually it indicates that an operator or delimiter was omitted, such as a semicolon. @@ -1632,10 +1698,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 +=item ()-group starts with a count -(F) In pack/unpack a ()-group started with a count. A count is +(F) A ()-group started with a count. A count is supposed to follow something: a template character or a ()-group. + See L. =item %s had compilation errors @@ -1693,6 +1760,15 @@ to your Perl administrator. (W syntax) An illegal character was found in a prototype declaration. Legal characters in prototypes are $, @, %, *, ;, [, ], &, and \. +=item Illegal declaration of anonymous subroutine + +(F) When using the C keyword to construct an anonymous subroutine, +you must always specify a block of code. See L. + +=item Illegal declaration of subroutine %s + +(F) A subroutine was not declared correctly. See L. + =item Illegal division by zero (F) You tried to divide a number by 0. Either something was wrong in @@ -1742,6 +1818,11 @@ name or CLI symbol definition when preparing to iterate over %ENV, and didn't see the expected delimiter between key and value, so the line was ignored. +=item Impossible to activate assertion call + +(W assertions) You're calling an assertion function in a block that is +not under the control of the C pragma. + =item (in cleanup) %s (W misc) This prefix usually indicates that a DESTROY() method raised @@ -1779,9 +1860,9 @@ the world. See L. (F) You can't use system(), exec(), or a piped open in a setuid or setgid script if any of C<$ENV{PATH}>, C<$ENV{IFS}>, C<$ENV{CDPATH}>, -C<$ENV{ENV}> or C<$ENV{BASH_ENV}> are derived from data supplied (or -potentially supplied) by the user. The script must set the path to a -known value, using trustworthy data. See L. +C<$ENV{ENV}>, C<$ENV{BASH_ENV}> or C<$ENV{TERM}> are derived from data +supplied (or potentially supplied) by the user. The script must set +the path to a known value, using trustworthy data. See L. =item Integer overflow in %s number @@ -1795,6 +1876,15 @@ transparently promotes all numbers to a floating point representation internally--subject to loss of precision errors in subsequent operations. +=item Integer overflow in version + +(F) Some portion of a version initialization is too large for the +size of integers for your architecture. This is not a warning +because there is no rational reason for a version to try and use a +element larger than typically 2**32. This is usually caused by +trying to use some odd mathematical operation as a version, like +100/9. + =item Internal disaster in regex; marked by <-- HERE in m/%s/ (P) Something went badly wrong in the regular expression parser. @@ -1846,7 +1936,7 @@ C<{}> from your ending C<\x{}> - C<\x> without the curly braces can go only up to C. The <-- HERE shows in the regular expression about where the problem was discovered. See L. -=item Invalid [] range "%s" in transliteration operator +=item Invalid range "%s" in transliteration operator (F) The range specified in the tr/// or y/// operator had a minimum character greater than the maximum character. See L. @@ -1858,19 +1948,31 @@ elements of an attribute list. If the previous attribute had a parenthesised parameter list, perhaps that list was terminated too soon. See L. -=item Invalid type in pack: '%s' +=item Invalid separator character %s in PerlIO layer specification %s -(F) The given character is not a valid pack type. See L. -(W pack) The given character is not a valid pack type but used to be -silently ignored. +(W layer) When pushing layers onto the Perl I/O system, something other than a +colon or whitespace was seen between the elements of a layer list. +If the previous attribute had a parenthesised parameter list, perhaps that +list was terminated too soon. -=item Invalid type in unpack: '%s' +=item Invalid type '%s' in %s -(F) The given character is not a valid unpack type. See -L. -(W unpack) The given character is not a valid unpack type but used to be +(F) The given character is not a valid pack or unpack type. +See L. +(W) The given character is not a valid pack or unpack type but used to be silently ignored. +=item Invalid version format (multiple underscores) + +(F) Versions may contain at most a single underscore, which signals +that the version is a beta release. See L for the allowed +version formats. + +=item Invalid version format (underscores before decimal) + +(F) Versions may not contain decimals after the optional underscore. +See L for the allowed version formats. + =item ioctl is not implemented (F) Your machine apparently doesn't implement ioctl(), which is pretty @@ -1881,11 +1983,23 @@ strange for a machine that supports C. (W unopened) You tried ioctl() on a filehandle that was never opened. Check you control flow and number of arguments. +=item IO layers (like "%s") unavailable + +(F) Your Perl has not been configured to have PerlIO, and therefore +you cannot use IO layers. To have PerlIO Perl must be configured +with 'useperlio'. + =item IO::Socket::atmark not implemented on this architecture (F) Your machine doesn't implement the sockatmark() functionality, neither as a system call or an ioctl call (SIOCATMARK). +=item $* is no longer supported + +(D deprecated) The special variable C<$*>, deprecated in older perls, has +been removed as of 5.9.0 and is no longer supported. You should use the +C and C regexp modifiers instead. + =item `%s' is not a code reference (W overload) The second (fourth, sixth, ...) argument of overload::constant @@ -1924,12 +2038,24 @@ L. (F) While under the C pragma, switching the real and effective uids or gids failed. +=item length/code after end of string in unpack + +(F) While unpacking, the string buffer was alread used up when an unpack +length/code combination tried to obtain more data. This results in +an undefined value for the length. See L. + =item listen() on closed socket %s (W closed) You tried to do a listen on a closed socket. Did you forget to check the return value of your socket() call? See L. +=item Lookbehind longer than %d not implemented in regex; marked by <-- HERE in m/%s/ + +(F) There is currently a limit on the length of string which lookbehind can +handle. This restriction may be eased in a future release. The <-- HERE +shows in the regular expression about where the problem was discovered. + =item lstat() on filehandle %s (W io) You tried to do an lstat on a filehandle. What did you mean @@ -1942,13 +2068,15 @@ instead on the filehandle.) values cannot be returned in subroutines used in lvalue context. See L. -=item Lookbehind longer than %d not implemented in regex; +=item Malformed integer in [] in pack -marked by <-- HERE in m/%s/ +(F) Between the brackets enclosing a numeric repeat count only digits +are permitted. See L. -(F) There is currently a limit on the length of string which lookbehind can -handle. This restriction may be eased in a future release. The <-- HERE -shows in the regular expression about where the problem was discovered. +=item Malformed integer in [] in unpack + +(F) Between the brackets enclosing a numeric repeat count only digits +are permitted. See L. =item Malformed PERLLIB_PREFIX @@ -1984,9 +2112,7 @@ possibility is careless use of utf8::upgrade(). Perl thought it was reading UTF-16 encoded character data but while doing it Perl met a malformed Unicode surrogate. -=item %s matches null string many times in regex; - -marked by <-- HERE in m/%s/ +=item %s matches null string many times in regex; marked by <-- HERE in m/%s/ (W regexp) The pattern you've specified would be an infinite loop if the regular expression engine didn't specifically check for that. The <-- HERE @@ -1999,7 +2125,7 @@ See L. interpreter, especially if the word that is being warned about is "use" or "my". -=item % may only be used in unpack +=item % may not be used in pack (F) You can't pack a string by supplying a checksum, because the checksumming process loses information, and you can't go the other way. @@ -2041,6 +2167,11 @@ double-quotish context. C construction, but the command was missing or blank. +=item Missing control char name in \c + +(F) A double-quoted string ended with "\c", without the required control +character name. + =item Missing name in "my sub" (F) The reserved syntax for lexically scoped subroutines requires that @@ -2054,8 +2185,8 @@ can vary from one line to the next. =item (Missing operator before %s?) -(S) This is an educated guess made in conjunction with the message "%s -found where operator expected". Often the missing operator is a comma. +(S syntax) 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 @@ -2069,8 +2200,8 @@ were last editing. =item (Missing semicolon on previous line?) -(S) This is an educated guess made in conjunction with the message "%s -found where operator expected". Don't automatically put a semicolon on +(S syntax) This is an educated guess made in conjunction with the message +"%s found where operator expected". Don't automatically put a semicolon on the previous line just because you saw this message. =item Modification of a read-only value attempted @@ -2129,22 +2260,17 @@ See L for details. (W syntax) Multidimensional arrays aren't written like C<$foo[1,2,3]>. They're written like C<$foo[1][2][3]>, as in C. -=item / must be followed by a*, A* or Z* +=item '/' must be followed by 'a*', 'A*' or 'Z*' (F) You had a 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 be followed by a, A or Z +=item '/' must follow a numeric type in unpack -(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 follow a numeric type - -(F) You had an unpack template that contained a '#', but this did not -follow some numeric unpack specification. See L. +(F) You had an unpack template that contained a '/', but this did not +follow some unpack specification producing a numeric value. +See L. =item "my sub" not yet implemented @@ -2164,6 +2290,16 @@ If you had a good reason for having a unique name, then just mention it again somehow to suppress the message. The C declaration is provided for this purpose. +NOTE: This warning detects symbols that have been used only once so $c, @c, +%c, *c, &c, sub c{}, c(), and c (the filehandle or format) are considered +the same; if a program uses $c only once but also uses any of the others it +will not trigger this warning. + +=item Negative '/' count in unpack + +(F) The length count obtained from a length/code unpack operation was +negative. See L. + =item Negative length (F) You tried to do a read/write/send/recv operation with a buffer @@ -2195,10 +2331,6 @@ setgid script to even be allowed to attempt. Generally speaking there will be another way to do what you want that is, if not secure, at least securable. See L. -=item No B<-e> allowed in setuid scripts - -(F) A setuid script can't be specified by the user. - =item No comma allowed after %s (F) A list operator that has a filehandle or "indirect object" is not @@ -2243,12 +2375,21 @@ but for some reason the perl5db.pl file (or some facsimile thereof) didn't define a DB::sub routine to be called at the beginning of each ordinary subroutine call. +=item No B<-e> allowed in setuid scripts + +(F) A setuid script can't be specified by the user. + =item No error file after 2> or 2>> on command line (F) An error peculiar to VMS. Perl handles its own command line redirection, and found a '2>' or a '2>>' on the command line, but can't find the name of the file to which to write data destined for stderr. +=item No group ending character '%c' found in template + +(F) A pack or unpack template has an opening '(' or '[' without its +matching counterpart. See L. + =item No input file after < on command line (F) An error peculiar to VMS. Perl handles its own command line @@ -2319,19 +2460,6 @@ this class doesn't exist at this point in your program. close a pipe which hadn't been opened. This should have been caught earlier as an attempt to close an unopened filehandle. -=item No such pseudo-hash field "%s" - -(F) You tried to access an array as a hash, but the field name used is -not defined. The hash at index 0 should map all valid field names to -array indices for that to work. - -=item No such pseudo-hash field "%s" in variable %s of type %s - -(F) You tried to access a field of a typed variable where the type does -not know about the field name. The field names are looked up in the -%FIELDS hash in the type package at compile time. The %FIELDS hash is -%usually set up with the 'fields' pragma. - =item No such signal: SIG%s (W signal) You specified a signal name as a subscript to %SIG that was @@ -2408,12 +2536,6 @@ 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