X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperldiag.pod;h=70daac24f739f93f646c570ffd09a4727d3e6538;hb=7ed149c909e2812f62b12bd7d09f4ccfb79e0041;hp=1657c45109ffe410ad94b4b30ab6aeb0a558cf2d;hpb=be98fb356a796bbf223f55e771e6c04069c84d0d;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 1657c45..70daac2 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -76,6 +76,13 @@ on the operator (e.g. C) or by declaring the subroutine to be an object method (see L or L). +=item Ambiguous range in transliteration operator + +(F) You wrote something like C which doesn't mean anything at +all. To include a C<-> character in a transliteration, put it either +first or last. (In the past, C was synonymous with +C, which was probably not what you would have expected.) + =item Ambiguous use of %s resolved as %s (W ambiguous)(S) You said something that may not be interpreted the way @@ -175,6 +182,24 @@ 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 Attempt to bless into a reference + +(F) The CLASSNAME argument to the bless() operator is expected to be +the name of the package to bless the resulting object into. You've +supplied instead a reference to something: perhaps you wrote + + bless $self, $proto; + +when you intended + + bless $self, ref($proto) || $proto; + +If you actually want to bless into the stringified version +of the reference supplied, you need to stringify it yourself, for +example by: + + bless $self, "$proto"; + =item Attempt to free non-arena SV: 0x%lx (P internal) All SV objects are supposed to be allocated from arenas @@ -254,9 +279,9 @@ open(), or did it in another package. (S malloc) An internal routine called free() on something that had never been malloc()ed in the first place. Mandatory, but can be disabled by -setting environment variable C to 1. +setting environment variable C to 0. -This message can be quite often seen with DB_File on systems with "hard" +This message can be seen quite often with DB_File on systems with "hard" dynamic linking, like C and C. It is a bug of C which is left unnoticed if C uses I system malloc(). @@ -379,7 +404,7 @@ check the return value of your socket() call? See L. =item Bizarre copy of %s in %s (P) Perl detected an attempt to copy an internal value that is not -copiable. +copyable. =item B<-P> not allowed for setuid/setgid script @@ -419,12 +444,6 @@ L. (F) Only hard references may be blessed. This is how Perl "enforces" encapsulation of objects. See L. -=item Can't break at that line - -(S internal) A warning intended to only be printed while running within -the debugger, indicating the line number specified wasn't the location -of a statement that could be stopped at. - =item Can't call method "%s" in empty package "%s" (F) You called a method correctly, and it correctly indicated a package @@ -538,10 +557,11 @@ C<-i.bak>, or some such. characters and Perl was unable to create a unique filename during inplace editing with the B<-i> switch. The file was ignored. -=item Can't do {n,m} with n > m +=item Can't do {n,m} with n > m at . +(F) Minima must be less than or equal to maxima. If you really want your +regexp to match something 0 times, just put {0}. The . =item Can't do setegid! @@ -747,6 +767,12 @@ 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 (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 @@ -1012,35 +1038,6 @@ 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 class syntax [%s] belongs inside character classes - -(W unsafe) The character class constructs [: :], [= =], and [. .] go -I character classes, the [] are part of the construct, for -example: /[012[:alpha:]345]/. Note that [= =] and [. .] are not -currently implemented; they are simply placeholders for future -extensions. - -=item Character class syntax [. .] is reserved for future extensions - -(W regexp) 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 regexp) 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 [:%s:] unknown - -(F) The class in the character class [: :] syntax is unknown. See -L. - =item chmod() mode argument is missing initial 0 (W chmod) A novice will sometimes say @@ -1051,7 +1048,7 @@ not realizing that 777 will be interpreted as a decimal number, equivalent to 01411. Octal constants are introduced with a leading 0 in Perl, as in C. -=item Close on unopened file <%s> +=item close() on unopened filehandle %s (W unopened) You tried to close a filehandle that was never opened. @@ -1075,7 +1072,7 @@ arbitrarily. ("Simple" and "medium" situations are handled without recursion and are not subject to a limit.) Try shortening the string under examination; looping in Perl code (e.g. with C) rather than in the regular expression engine; or rewriting the regular expression so -that it is simpler or backtracks less. (See L for information +that it is simpler or backtracks less. (See L for information on I.) =item connect() on closed socket %s @@ -1347,12 +1344,6 @@ 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 Filehandle %s never opened - -(W unopened) An I/O operation was attempted on a filehandle that was -never initialized. You need to do an open() or a socket() call, or call -a constructor from the FileHandle package. - =item Filehandle %s opened only for input (W io) You tried to write on a read-only filehandle. If you intended it @@ -1388,10 +1379,11 @@ some time before now. Check your logic flow. flock() operates on filehandles. Are you attempting to call flock() on a dirhandle by the same name? -=item ?+* follows nothing in regexp +=item Quantifier follows nothing at . +(F) You started a regular expression with a quantifier. Backslash it if you +meant it literally. The . =item Format not terminated @@ -1625,16 +1617,6 @@ 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. -=item In string, @%s now must be written as \@%s - -(F) It used to be that Perl would try to guess whether you wanted an -array interpolated or a literal @. It did this when the string was -first used at runtime. Now strings are parsed at compile time, and -ambiguous instances of @ must be disambiguated, either by prepending a -backslash to indicate a literal, or by declaring (or using) the array -within the program before the string (lexically). (Someday it will -simply assume that an unbackslashed @ interpolates an array.) - =item Integer overflow in %s number (W overflow) The hexadecimal, octal or binary number you have specified @@ -1647,9 +1629,12 @@ transparently promotes all numbers to a floating point representation internally--subject to loss of precision errors in subsequent operations. -=item internal disaster in regexp +=item Internal disaster at ). Somehow, this count has become scrambled, so Perl is making a guess and treating this C as a request to terminate the Perl script and execute the specified command. -=item internal urp in regexp at /%s/ +=item Internal urp at . (F) The range specified in a character class had a minimum character greater than the maximum character. See L. +=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. + =item Invalid separator character %s in attribute list (F) Something other than a colon or whitespace was seen between the @@ -1749,12 +1741,24 @@ effective uids or gids failed. to check the return value of your socket() call? See L. +=item lstat() on filehandle %s + +(W io) You tried to do a lstat on a filehandle. What did you mean +by that? lstat() makes sense only on filenames. (Perl did a fstat() +instead on the filehandle.) + =item Lvalue subs returning %s not implemented yet (F) Due to limitations in the current implementation, array and hash values cannot be returned in subroutines used in lvalue context. See L. +=item Lookbehind longer than %d not implemented at is indeed a prefix of 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 F. +"PERLLIB_PREFIX" in L. + +=item Malformed UTF-16 surrogate + +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 @@ -1856,13 +1865,13 @@ catches that. But an easy way to do the same thing is: Another way is to assign to a substr() that's off the end of the string. -=item Modification of non-creatable array value attempted, subscript %d +=item Modification of non-creatable array value attempted, %s (F) You tried to make an array value spring into existence, and the subscript was probably negative, even counting from end of the array backwards. -=item Modification of non-creatable hash value attempted, subscript "%s" +=item Modification of non-creatable hash value attempted, %s (P) You tried to make a hash value spring into existence, and it couldn't be created for some peculiar reason. @@ -1926,14 +1935,16 @@ 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 nested *?+ in regexp +=item Nested quantifiers at , C<+?>, and C appear to be nested quantifiers, but aren't. See L. + =item %s never introduced (S internal) The symbol in question was declared but somehow went out of @@ -2224,6 +2235,17 @@ pointing outside the buffer. This is difficult to imagine. The sole exception to this is that Cing past the buffer will extend the buffer and zero pad the new area. +=item -%s on unopened filehandle %s + +(W unopened) You tried to invoke a file test operator on a filehandle +that isn't open. Check your logic. See also L. + +=item %s() on unopened %s %s + +(W unopened) An I/O operation was attempted on a filehandle that was +never initialized. You need to do an open(), a sysopen(), or a socket() +call, or call a constructor from the FileHandle package. + =item oops: oopsAV (S internal) An internal warning that the grammar is screwed up. @@ -2472,6 +2494,11 @@ was string. (P) The lexer got into a bad state while processing a case modifier. +=item panic: utf16_to_utf8: odd bytelen + +(P) Something tried to call utf16_to_utf8 with an odd (as opposed +to even) byte length. + =item Parentheses missing around "%s" list (W parenthesis) You said something like @@ -2493,7 +2520,7 @@ you upgraded, anyway? See L. =item PERL_SH_DIR too long (F) An error peculiar to OS/2. PERL_SH_DIR is the directory to find the -C-shell in. See "PERL_SH_DIR" in F. +C-shell in. See "PERL_SH_DIR" in L. =item perl: warning: Setting locale failed. @@ -2526,6 +2553,35 @@ problem can be found in L section B. process which isn't a subprocess of the current process. While this is fine from VMS' perspective, it's probably not what you intended. +=item POSIX syntax [%s] belongs inside character classes + +(W unsafe) The character class constructs [: :], [= =], and [. .] go +I character classes, the [] are part of the construct, for +example: /[012[:alpha:]345]/. Note that [= =] and [. .] are not +currently implemented; they are simply placeholders for future +extensions and will cause fatal errors. + +=item POSIX syntax [. .] is reserved for future extensions + +(F regexp) 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 POSIX syntax [= =] is reserved for future extensions + +(F) 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 POSIX class [:%s:] unknown + +(F) The class in the character class [: :] syntax is unknown. See +L. + =item POSIX getpgrp can't take an argument (F) Your system has POSIX getpgrp(), which takes no argument, unlike @@ -2641,13 +2697,27 @@ before now. Check your logic flow. applications die in silence. It is considered a feature of the OS/2 port. One can easily disable this by appropriate sighandlers, see L. See also "Process terminated by SIGTERM/SIGINT" -in F. +in L. =item Prototype mismatch: %s vs %s (S unsafe) The subroutine being declared or defined had previously been declared or defined with a different function prototype. +=item Quantifier in {,} bigger than %d at . + +=item Quantifier unexpected on zero-length expression at , not C. + =item Range iterator outside integer range (F) One (or both) of the numeric arguments to the range operator ".." @@ -2680,7 +2750,7 @@ which is why it's currently left out of your copy. (F) More than 100 levels of inheritance were used. Probably indicates an unintended loop in your inheritance hierarchy. -=item Recursive inheritance detected while looking for method '%s' in package '%s' +=item Recursive inheritance detected while looking for method %s (F) More than 100 levels of inheritance were encountered while invoking a method. Probably indicates an unintended loop in your inheritance @@ -2708,17 +2778,22 @@ Doing so has no effect. (W internal) The internal sv_replace() function was handed a new SV with a reference count of other than 1. +=item Reference to nonexistant group at in your regular expression, but there are +not at least seven sets of capturing parentheses in the expression. If you +wanted to have the character with value 7 inserted into the regular expression, +prepend a zero to make the number at least two digits: C<\07> + +The from a variable C<$m> may cause this error. -=item %sseek() on unopened file +=item %sseek() on unopened filehandle (W unopened) You tried to use the seek() or sysseek() function on a filehandle that was either never opened or has since been closed. @@ -2815,22 +2890,31 @@ scalar that had previously been marked as free. (W closed) The socket you're sending to got itself closed sometime before now. Check your logic flow. -=item Sequence (? incomplete +=item Sequence (? incomplete at . -=item Sequence (?%s...) not implemented +=item Sequence (?{...}) not terminated or not {}-balanced in regex m/%s/ + +(F) If the contents of a (?{...}) clause contains braces, they must balance +for Perl to properly detect the end of the clause. See L. -(F) A proposed regular expression extension has the character reserved -but has not yet been written. See L. +=item Sequence (?%s...) not implemented at . + +=item Sequence (?%s...) not recognized at . -=item Sequence (?#... not terminated +=item Sequence (?#... not terminated in regex m/%s/ (F) A regular expression comment must be terminated by a closing parenthesis. Embedded parentheses aren't allowed. See L. @@ -2962,21 +3046,12 @@ unless there was a failure. You probably wanted to use system() instead, which does return. To suppress this warning, put the exec() in a block by itself. -=item Stat on unopened file <%s> - -(W unopened) You tried to use the stat() function (or an equivalent file -test) on a filehandle that was either never opened or has since been -closed. - -=item Strange *+?{} on zero-length expression +=item stat() on unopened filehandle %s -(W regexp) You applied a regular expression quantifier in a place where -it makes no sense, such as on a zero-width assertion. Try putting the -quantifier inside the assertion instead. For example, the way to match -"abc" provided that it is followed by three repetitions of "xyz" is -C, not C. +(W unopened) You tried to use the stat() function on a filehandle that +was either never opened or has since been closed. -=item Stub found while resolving method `%s' overloading `%s' in package `%s' +=item Stub found while resolving method `%s' overloading %s (P) Overloading resolution over @ISA tree may be broken by importation stubs. Stubs should never be implicitly created, but explicit calls to @@ -3023,6 +3098,24 @@ assignment or as a subroutine argument for example). (F) Your Perl was compiled with B<-D>SETUID_SCRIPTS_ARE_SECURE_NOW, but a version of the setuid emulator somehow got run anyway. +=item Switch (?(condition)... contains too many branches at , enclose it in +clustering parentheses: + + (?(condition)(?:this|that|other)|else-clause) + +The . + +=item Switch condition not recognized at . + =item switching effective %s is not implemented (F) While under the C pragma, we cannot switch the real @@ -3077,16 +3170,11 @@ before now. Check your logic flow. (F) You tried to use C to reach a label that was too deeply nested for Perl to reach. Perl is doing you a favor by refusing. -=item tell() on unopened file +=item tell() on unopened filehandle (W unopened) You tried to use the tell() function on a filehandle that was either never opened or has since been closed. -=item Test on unopened file <%s> - -(W unopened) You tried to invoke a file test operator on a filehandle -that isn't open. Check your logic. See also L. - =item That use of $[ is unsupported (F) Assignment to C<$[> is now strictly circumscribed, and interpreted @@ -3297,11 +3385,23 @@ Check the #! line, or manually feed your script into Perl yourself. (F) The unexec() routine failed for some reason. See your local FSF representative, who probably put it there in the first place. + =item Unknown BYTEORDER (F) There are no byte-swapping functions for a machine with this byte order. +=item Unknown switch condition (?(%.2s at . + =item Unknown open() mode '%s' (F) The second argument of 3-argument open() is not among the list @@ -3315,13 +3415,14 @@ iterating over it, and someone else stuck a message in the stream of data Perl expected. Someone's very confused, or perhaps trying to subvert Perl's population of %ENV for nefarious purposes. -=item unmatched [] in regexp +=item unmatched [ at . +first. See L. The -delimited regular expression. The character was -understood literally. +recognized by Perl. This combination appears in an interpolated variable or +a C<'>-delimited regular expression. The character was understood +literally. The , C, and so on. +=item Unsupported script encoding + +(F) Your program file begins with a Unicode Byte Order Mark (BOM) which +declares it to be in a Unicode encoding that Perl cannot yet read. + =item Unsupported socket function "%s" called (F) Your machine doesn't support the Berkeley socket mechanism, or at @@ -3420,6 +3528,12 @@ an attribute list, but the matching closing (right) parenthesis character was not found. You may need to add (or remove) a backslash character to get your parentheses to balance. See L. +=item Unterminated compressed integer + +(F) An argument to unpack("w",...) was incompatible with the BER +compressed integer format and could not be converted to an integer. +See L. + =item Unterminated <> operator (F) The lexer saw a left angle bracket in a place where it was expecting @@ -3634,6 +3748,12 @@ anonymous, using the C syntax. When inner anonymous subs that reference variables in outer subroutines are called or referenced, they are automatically rebound to the current values of such variables. +=item Variable length lookbehind not implemented at statement into