X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperldiag.pod;h=6e5207f5ef1f6e3ce0c355aec79018b07badc168;hb=4358a253560c226dd674c77f83b913c071c4fa25;hp=e64253e5596b03ef2527f44176ee092f1d890a7c;hpb=4ffa73a366885f682ceccdeee45e43075e0c312e;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perldiag.pod b/pod/perldiag.pod index e64253e..6e5207f 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 the 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 & @@ -165,17 +157,21 @@ or a hash or array slice, such as: name, and not a subroutine call. C will generate this error. -=item '%s' trapped by operation mask - -(F) You tried to use an operator from a Safe compartment in which it's -disallowed. See L. - =item Argument "%s" isn't numeric%s (W numeric) The indicated string was fed as an argument to an operator 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 @@ -195,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 threads)(S) 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 @@ -234,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 @@ -284,6 +282,15 @@ invalid anytime, even before the end of the current statement. Use literals or global values as arguments to the "p" pack() template to avoid this warning. +=item Attempt to set length of freed array + +(W) You tried to set the length of an array which has been freed. You +can do this by storing a reference to the scalar representing the last index +of an array and later assigning through that reference. For example + + $r = do {my @a; \$#a}; + $$r = 503 + =item Attempt to use reference as lvalue in substr (W substr) You supplied a reference as the first argument to substr() @@ -439,11 +446,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 @@ -466,29 +468,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 Can only compress unsigned integers - -(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 Cannot compress integer +=item Cannot compress integer in pack (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 +=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 / cannot take a count +=item Can only compress unsigned integers 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 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 @@ -643,6 +639,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 @@ -692,6 +695,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 @@ -704,15 +716,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 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 fork (F) A fatal error occurred while trying to fork while opening a @@ -758,11 +761,16 @@ a block, except that it isn't a proper block. This usually occurs if you tried to jump out of a sort() block or subroutine, which is a no-no. See L. -=item Can't goto subroutine from an eval-string +=item Can't goto subroutine from a sort sub (or similar callback) + +(F) The "goto subroutine" call can't be used to jump out of the +comparison sub for a sort(), or from a similar callback (such +as the reduce() function in List::Util). + +=item Can't goto subroutine from an eval-%s (F) The "goto subroutine" call can't be used to jump out of an eval -"string". (You can use it to jump out of an eval {BLOCK}, but you -probably don't want to.) +"string" or block. =item Can't goto subroutine outside a subroutine @@ -790,6 +798,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 @@ -821,28 +839,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 @@ -926,10 +944,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 @@ -938,13 +960,6 @@ missing. You need to figure out where your CRTL misplaced its environ or define F (see L) so that environ is not searched. -=item Can't redefine active sort subroutine %s - -(F) Perl optimizes the internal handling of sort subroutines and keeps -pointers into them. You tried to redefine one such sort subroutine when -it was currently active, which is not allowed. If you really want to do -this, you should write C instead of C. - =item Can't "redo" outside a loop block (F) A "redo" statement was executed to restart the current block, but @@ -987,6 +1002,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, @@ -995,11 +1015,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 @@ -1047,17 +1062,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 @@ -1069,6 +1084,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 @@ -1082,6 +1103,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. @@ -1105,7 +1133,7 @@ references are disallowed. See L. (F) The compiler tried to interpret a bracketed expression as a subscript. But to the left of the brackets was an expression that -didn't look like an array reference, or anything else subscriptable. +didn't look like a hash or array reference, or anything else subscriptable. =item Can't use \%c to mean $%c in expression @@ -1127,7 +1155,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 @@ -1142,7 +1170,19 @@ 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 'W' format wrapped in pack + +(W pack) You said + + pack("U0W", $x) + +where $x is either less than 0 or more than 255. However, C-mode expects +all values to fall in the interval [0, 255], so Perl behaved as if you +meant: + + pack("U0W", $x & 255) + +=item Character in 'c' format wrapped in pack (W pack) You said @@ -1157,10 +1197,51 @@ 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 in unpack + +(W unpack) You tried something like + + unpack("H", "\x{2a1}") + +where the format expects to process a byte (a character with a value +below 256), but a higher value was provided instead. Perl uses the value +modulus 256 instead, as if you had provided: + + unpack("H", "\x{a1}") + +=item Character(s) in '%c' format wrapped in pack + +(W pack) You tried something like + + pack("u", "\x{1f3}b") + +where the format expects to process a sequence of bytes (character with a +value below 256), but some of the characters had a higher value. Perl +uses the character values modulus 256 instead, as if you had provided: + + pack("u", "\x{f3}b") + +=item Character(s) in '%c' format wrapped in unpack + +(W unpack) You tried something like + + unpack("s", "\x{1f3}b") + +where the format expects to process a sequence of bytes (character with a +value below 256), but some of the characters had a higher value. Perl +uses the character values modulus 256 instead, as if you had provided: + + unpack("s", "\x{f3}b") + =item close() on unopened filehandle %s (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. @@ -1195,7 +1276,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 @@ -1264,16 +1344,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" @@ -1305,6 +1380,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. @@ -1347,6 +1444,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. @@ -1357,8 +1459,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 @@ -1376,10 +1478,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. @@ -1394,6 +1501,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 @@ -1502,6 +1615,13 @@ you which section of the Perl source code is distressed. (F) Your machine apparently doesn't implement fcntl(). What is this, a PDP-11 or something? +=item Field too wide in 'u' format in pack + +(W pack) Each line in an uuencoded string start with a length indicator +which can't encode values above 63. So there is no point in asking for +a line length bigger than that. Perl will behave as if you specified +C as format. + =item Filehandle %s opened only for input (W io) You tried to write on a read-only filehandle. If you intended @@ -1521,13 +1641,13 @@ Another possibility is that you attempted to open filedescriptor 0 =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 +as STDOUT or STDERR. This occurred 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. +as STDIN. This occurred because you closed STDIN previously. =item Final $ should be \$ or $name @@ -1536,13 +1656,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 @@ -1550,14 +1663,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 @@ -1586,8 +1691,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. @@ -1655,10 +1760,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 @@ -1721,6 +1827,10 @@ characters in prototypes are $, @, %, *, ;, [, ], &, and \. (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 @@ -1755,7 +1865,7 @@ 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<-[DIMUdmtw]>. +following switches: B<-[CDIMUdmtwA]>. =item Ill-formed CRTL environ value "%s" @@ -1770,6 +1880,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 @@ -1801,7 +1916,8 @@ L for more information. (F) You can't use system(), exec(), or a piped open in a setuid or setgid script if C<$ENV{PATH}> contains a directory that is writable by -the world. See L. +the world. Also, the PATH must not contain any relative directory. +See L. =item Insecure $ENV{%s} while running %s @@ -1895,17 +2011,18 @@ 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) @@ -1929,11 +2046,29 @@ 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 $# is no longer supported + +(D deprecated) The special variable C<$#>, deprecated in older perls, has +been removed as of 5.9.3 and is no longer supported. You should use the +printf/sprintf functions instead. + =item `%s' is not a code reference (W overload) The second (fourth, sixth, ...) argument of overload::constant @@ -1972,12 +2107,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 already 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 @@ -1990,13 +2137,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 @@ -2021,7 +2170,7 @@ when the function is called. =item Malformed UTF-8 character (%s) -Perl detected something that didn't comply with UTF-8 encoding rules. +(W utf8) 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 @@ -2032,9 +2181,22 @@ 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; +=item Malformed UTF-8 string in pack + +(F) You tried to pack something that didn't comply with UTF-8 encoding +rules and perl was unable to guess how to make more progress. + +=item Malformed UTF-8 string in unpack + +(F) You tried to unpack something that didn't comply with UTF-8 encoding +rules and perl was unable to guess how to make more progress. -marked by <-- HERE in m/%s/ +=item Malformed UTF-8 string in '%c' format in unpack + +(F) You tried to unpack something that didn't comply with UTF-8 encoding +rules and perl was unable to guess how to make more progress. + +=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 @@ -2047,7 +2209,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. @@ -2073,6 +2235,11 @@ ended earlier on the current line. (W syntax) An underscore (underbar) in a numeric constant did not separate two digits. +=item Missing argument to -%c + +(F) The argument to the indicated command line switch must follow +immediately after the switch, without intervening spaces. + =item Missing %sbrace%s on \N{} (F) Wrong syntax of character name literal C<\N{charname}> within @@ -2107,8 +2274,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 @@ -2122,8 +2289,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 @@ -2182,22 +2349,11 @@ 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* - -(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 @@ -2217,6 +2373,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 @@ -2248,10 +2414,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 @@ -2279,22 +2441,25 @@ doesn't know where you want to pipe the output from this command. =item No DB::DB routine defined (F) The currently executing code was compiled with the B<-d> switch, but -for some reason the perl5db.pl file (or some facsimile thereof) didn't -define a routine to be called at the beginning of each statement. Which -is odd, because the file should have been required automatically, and -should have blown up the require if it didn't parse right. +for some reason the current debugger (e.g. F or a C +module) didn't define a routine to be called at the beginning of each +statement. =item No dbm on this machine (P) This is counted as an internal error, because every machine should supply dbm nowadays, because Perl comes with SDBM. See L. -=item No DBsub routine +=item No DB::sub routine defined + +(F) The currently executing code was compiled with the B<-d> switch, but +for some reason the current debugger (e.g. F or a C +module) didn't define a C routine to be called at the beginning +of each ordinary subroutine call. + +=item No B<-e> allowed in setuid scripts -(F) The currently executing code was compiled with the B<-d> switch, -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. +(F) A setuid script can't be specified by the user. =item No error file after 2> or 2>> on command line @@ -2302,6 +2467,11 @@ ordinary subroutine call. 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 @@ -2351,16 +2521,17 @@ your system. (F) Configure didn't find anything resembling the setreuid() call for your system. -=item No space allowed after -%c - -(F) The argument to the indicated command line switch must follow -immediately after the switch, without intervening spaces. - -=item No %s specified for -%c +=item No %s specified for -%c (F) The indicated command line switch needs a mandatory argument, but you haven't specified one. +=item No such class field "%s" in variable %s of type %s + +(F) You tried to access a key from a hash through the indicated typed variable +but that key is not allowed by the package of the same type. The indicated +package has restricted the set of allowed keys using the L pragma. + =item No such class %s (F) You provided a class qualifier in a "my" or "our" declaration, but @@ -2448,12 +2619,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