X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperldiag.pod;h=7c8ab3d48274ab462d84b27eb877ecfc825a81f2;hb=5081475eefaf24307ce7eaf4c87aafd588b37e98;hp=e35ad4661918fd8976623669965dac7d9b065c35;hpb=1163b5c41f1e1e2856ca82fef1598bfbb6c54d72;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perldiag.pod b/pod/perldiag.pod index e35ad46..7c8ab3d 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -188,10 +188,6 @@ the return value of your socket() call? See L. (X) You can't allocate more than 64K on an MS-DOS machine. -=item Allocation too large - -(F) You can't allocate more than 2^31+"small amount" bytes. - =item Applying %s to %s will act on scalar(%s) (W) The pattern match (//), substitution (s///), and transliteration (tr///) @@ -320,6 +316,16 @@ system malloc(). (P) One of the internal hash routines was passed a null HV pointer. +=item Bad index while coercing array into hash + +(F) A field name of a typed variable was looked up in the %FIELDS +hash, but the index found was not legal, i.e. less than 1. + +=item Bad index while coercing array into hash + +(F) The index looked up in the hash found as 0'th element of the array +is not legal. Index values must be at 1 or greater. + =item Bad name after %s:: (F) You started to name a symbol by using a package prefix, and then didn't @@ -496,6 +502,12 @@ but then $foo no longer contains a glob. (F) Certain types of SVs, in particular real symbol table entries (typeglobs), can't be forced to stop being what they are. +=item Can't coerce array into hash + +(F) You used an array where a hash was expected, but the array has no +information on how to map from keys to array indices. You can do that +only with arrays that have a hash reference at index 0. + =item Can't create pipe mailbox (P) An error peculiar to VMS. The process is suffering from exhausted quotas @@ -1305,10 +1317,11 @@ for more information. script if C<$ENV{PATH}> contains a directory that is writable by the world. See L. -=item Insecure PATH +=item Insecure $ENV{%s} while running %s (F) You can't use system(), exec(), or a piped open in a setuid or -setgid script if C<$ENV{PATH}> is derived from data supplied (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. @@ -1380,11 +1393,6 @@ ignored. (F) Your machine apparently doesn't implement ioctl(), which is pretty strange for a machine that supports C. -=item JMPENV_JUMP(%d) is bogus - -(S) Either some extension is trying to raise an exception type that is not -supported by the JMPENV API, or memory has been corrupted. See L. - =item junk on end of regexp (P) The regular expression parser is confused. @@ -1609,6 +1617,19 @@ your system. (F) The argument to B<-I> must follow the B<-I> immediately with no intervening space. +=item No such array field + +(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 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 pipe open (P) An error peculiar to VMS. The internal routine my_pclose() tried to @@ -1738,7 +1759,7 @@ will extend the buffer and zero pad the new area. (S) An internal warning that the grammar is screwed up. -=item Operation `%s': no method found,%s +=item Operation `%s': no method found, %s (F) An attempt was made to perform an overloaded operation for which no handler was defined. While some handlers can be autogenerated in @@ -1759,7 +1780,7 @@ if you said "*foo * 'foo'". (F) The yacc parser wanted to grow its stack so it could continue parsing, but realloc() wouldn't give it more memory, virtual or otherwise. -=item Out of memory! +=item Out of memory during request for %s (X|F) The malloc() function returned 0, indicating there was insufficient remaining memory (or virtual memory) to satisfy the request. @@ -1770,13 +1791,19 @@ However, if compiled for this, Perl may use the contents of C<$^M> as an emergency pool after die()ing with this message. In this case the error is trappable I. -=item Out of memory during request for %s +=item Out of memory during "large" request for %s (F) The malloc() function returned 0, indicating there was insufficient remaining memory (or virtual memory) to satisfy the request. However, the request was judged large enough (compile-time default is 64K), so a possibility to shut down by trapping this error is granted. +=item Out of memory during ridiculously large request + +(F) You can't allocate more than 2^31+"small amount" bytes. This error +is most likely to be caused by a typo in the Perl program. e.g., C<$arr[time]> +instead of C<$arr[$time]>. + =item page overflow (W) A single call to write() produced more lines than can fit on a page. @@ -1920,9 +1947,7 @@ was string. =item panic: top_env -(X) An attempt was made to throw some sort of exception when there -was no exception stack. Either perl failed to initialize properly, or -the JMPENV API is being misused. See L. +(P) The compiler attempted to do a goto, or something weird like that. =item panic: yylex @@ -2051,6 +2076,13 @@ last argument of the previous construct, for example: (S) The subroutine being declared or defined had previously been declared or defined with a different function prototype. +=item Range iterator outside integer range + +(F) One (or both) of the numeric arguments to the range operator ".." +are outside the range which can be represented by integers internally. +One possible workaround is to force Perl to use magical string +increment by prepending "0" to your numbers. + =item Read on closed filehandle E%sE (W) The filehandle you're reading from got itself closed sometime before now. @@ -2066,11 +2098,16 @@ Check your logic flow. desired output is compiled into Perl, which entails some overhead, which is why it's currently left out of your copy. -=item Recursive inheritance detected +=item Recursive inheritance detected in package '%s' (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' + +(F) More than 100 levels of inheritance were encountered while invoking a +method. Probably indicates an unintended loop in your inheritance hierarchy. + =item Reference found where even-sized list expected (W) You gave a single reference where Perl was expecting a list with @@ -2321,6 +2358,21 @@ may break this. eval "sub name { ... }"; } +=item Subroutine %s hidden by keyword; use ampersand + +(W) You are trying to call a subroutine that has the same name as a +keyword. However, because the subroutine is not imported and +you're not using an ampersand, Perl won't call the subroutine. + +To force a subroutine call, either put an ampersand before the +subroutine name, or qualify the name with its package. Alternatively, +you can import the subroutine (or pretend that it's imported with the +C pragma). + +If the Perl operator is what you want, then eliminate this warning by +using the CORE:: prefix on the operator (e.g. CORE::log($x)) or by +declaring the subroutine to be an object method (see L). + =item Substitution loop (P) The substitution was looping infinitely. (Obviously, a @@ -2727,6 +2779,15 @@ In code that currently says C you should remove AutoLoader from @ISA and change C to C. +=item Use of reserved word "%s" is deprecated + +(D) The indicated bareword is a reserved word. Future versions of perl +may use it as a keyword, so you're better off either explicitly quoting +the word in a manner appropriate for its context of use, or using a +different name altogether. The warning can be suppressed for subroutine +names by either adding a C<&> prefix, or using a package qualifier, +e.g. C<&our()>, or C. + =item Use of %s is deprecated (D) The construct indicated is no longer recommended for use, generally