From 6651ba0b0f16f7658b2640c69edd3f8bd88571ee Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Tue, 27 Dec 2011 18:04:17 -0800 Subject: [PATCH] Document various messages in perldiag --- pod/perldiag.pod | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ t/porting/diag.t | 14 --------- 2 files changed, 90 insertions(+), 14 deletions(-) diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 93a7b8a..fb4836c 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -1194,6 +1194,11 @@ into a more specialized kind of SV. The top several SV types are so specialized, however, that they cannot be interconverted. This message indicates that such a conversion was attempted. +=item Can't use '%c' after -mname + +(F) You tried to call perl with the B<-m> switch, but you put something +other than "=" after the module name. + =item Can't use anonymous symbol table for method lookup (F) The internal routine that does method lookup was handed a symbol @@ -1396,6 +1401,10 @@ non-printable characters. You used it for a printable one, which is better written as simply itself, perhaps preceded by a backslash for non-word characters. +=item Cloning substitution context is unimplemented + +(F) Creating a new thread inside the C operator is not supported. + =item close() on unopened filehandle %s (W unopened) You tried to close a filehandle that was never opened. @@ -1573,6 +1582,8 @@ valid magic number. you have also specified an explicit size for the string. See L. +=item Deep recursion on anonymous subroutine + =item Deep recursion on subroutine "%s" (W recursion) This subroutine has called itself (directly or indirectly) @@ -2056,6 +2067,12 @@ 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 Goto undefined subroutine%s + +(F) You tried to call a subroutine with C syntax, but +the indicated subroutine hasn't been defined, or if it was, it +has since been undefined. + =item ()-group starts with a count (F) A ()-group started with a count. A count is supposed to follow @@ -2365,6 +2382,13 @@ escape was discovered. number. Either it is empty, or you tried to use a character other than 0 - 9 or A - F, a - f in a hexadecimal number. +=item Invalid module name %s with -%c option: contains single ':' + +(F) The module argument to perl's B<-m> and B<-M> command-line options +cannot contain single colons in the module name, but only in the +arguments after "=". In other words, B<-MFoo::Bar=:baz> is ok, but +B<-MFoo:Bar=baz> is not. + =item Invalid mro name: '%s' (F) You tried to C or C, @@ -2372,6 +2396,12 @@ where C is not a valid method resolution order (MRO). Currently, the only valid ones supported are C and C, unless you have loaded a module that is a MRO plugin. See L and L. +=item invalid option -D%c, use -D'' to see choices + +(F) Perl was called with invalid debugger flags. Call perl with +the B<-D> option with no flags to see the list of acceptable values. +See also L<< perlrun/B<-D>I >>. + =item Invalid [] range "%s" in regex; marked by <-- HERE in m/%s/ (F) The range specified in a character class had a minimum character @@ -2550,6 +2580,12 @@ detectable way. to check the return value of your socket() call? See L. +=item List form of piped open not implemented + +(F) On some platforms, notably Windows, the three-or-more-arguments +form of C does not support pipes, such as C. +Use the two-argument C form instead. + =item localtime(%f) too large (W overflow) You called C with a number that was larger @@ -2975,6 +3011,16 @@ 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 code specified for -%c + +(F) Perl's B<-e> and B<-E> command-line options require an argument. If +you want to run an empty program, pass the empty string as a separate +argument or run a program consisting of a single 0 or 1: + + perl -e "" + perl -e0 + perl -e1 + =item No comma allowed after %s (F) A list operator that has a filehandle or "indirect object" is @@ -3018,6 +3064,11 @@ 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 directory specified for -I + +(F) The B<-I> command-line switch requires a directory name as part of the +I argument. Use B<-Ilib>, for instance. B<-I lib> won't work. + =item No error file after 2> or 2>> on command line (F) An error peculiar to VMS. Perl handles its own command line @@ -3716,6 +3767,15 @@ so it was not possible to set up some or all fixed-width byte-order conversion functions. This is only a problem when you're using the '<' or '>' modifiers in (un)pack templates. See L. +=item Perl %s required (did you mean %s?)--this is only %s, stopped + +(F) The code you are trying to run has asked for a newer version of +Perl than you are running. Perhaps C was written instead +of C or C. Without the leading C, the number is +interpreted as a decimal, with every three digits after the +decimal point representing a part of the version number. So 5.10 +is equivalent to v5.100. + =item Perl %s required--this is only version %s, stopped (F) The module in question uses features of a version of Perl more @@ -3731,6 +3791,13 @@ C-shell in. See "PERL_SH_DIR" in L. See L for legal values. +=item Perls since %s too modern--this is %s, stopped + +(F) The code you are trying to run claims it will not run +on the version of Perl you are using because it is too new. +Maybe the code needs to be updated, or maybe it is simply +wrong and the version check should just be removed. + =item perl: warning: Setting locale failed. (S) The whole warning message will look something like: @@ -4027,6 +4094,13 @@ already been freed. the desired output is compiled into Perl, which entails some overhead, which is why it's currently left out of your copy. +=item Recursive call to Perl_load_module in PerlIO_find_layer + +(P) It is currently not permitted to load modules when creating +a filehandle inside an %INC hook. This can happen with C, which implicitly loads PerlIO::scalar. Try +loading PerlIO::scalar explicitly first. + =item Recursive inheritance detected in package '%s' (F) While calculating the method resolution order (MRO) of a package, Perl @@ -4783,6 +4857,12 @@ many values were temporarily localized. (W internal) The exit code detected an internal inconsistency in how many blocks were entered and left. +=item Unbalanced string table refcount: (%d) for "%s" + +(W internal) On exit, Perl found some strings remaining in the shared +string table used for copy on write and for hash keys. The entries +should have been freed, so this indicates a bug somewhere. + =item Unbalanced tmps: %d more allocs than frees (W internal) The exit code detected an internal inconsistency in how @@ -4834,6 +4914,11 @@ 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 Unexpected constant lvalue entersub entry via type/targ %d:%d + +(P) When compiling a subroutine call in lvalue context, Perl failed an +internal consistency check. It encountered a malformed op tree. + =item Unicode non-character U+%X is illegal for open interchange (W utf8, nonchar) Certain codepoints, such as U+FFFE and U+FFFF, are @@ -5530,6 +5615,11 @@ anonymous, using the C syntax. When inner anonymous subs that reference variables in outer subroutines are created, they are automatically rebound to the current values of such variables. +=item vector argument not supported with alpha versions + +(W internal) The %vd (s)printf format does not support version objects +with alpha parts. + =item Verb pattern '%s' has a mandatory argument in regex; marked by <-- HERE in m/%s/ (F) You used a verb pattern that requires an argument. Supply an diff --git a/t/porting/diag.t b/t/porting/diag.t index 9065659..ebdd49b 100644 --- a/t/porting/diag.t +++ b/t/porting/diag.t @@ -381,18 +381,15 @@ Can't spawn "%s": %s Can't %s script `%s' with ARGV[0] being `%s' Can't %s "%s": %s Can't %s `%s' with ARGV[0] being `%s' (looking for executables only, not found) -Can't use '%c' after -mname Can't use string ("%s"%s) as a subroutine ref while "strict refs" in use Can't use when() outside a topicalizer \%c better written as $%c Character(s) in '%c' format wrapped in %s -Cloning substitution context is unimplemented Code missing after '/' in pack Code missing after '/' in unpack Corrupted regexp opcode %d > %d '%c' outside of string in pack Debug leaking scalars child failed%s with errno %d: %s -Deep recursion on anonymous subroutine defined(\%hash) is deprecated Don't know how to handle magic of type \%o -Dp not implemented on this platform @@ -412,8 +409,6 @@ Illegal character %sin prototype for %s : %s Integer overflow in version %d internal %p might conflict with future printf extensions invalid control request: '\%o' -Invalid module name %s with -%c option: contains single ':' -invalid option -D%c, use -D'' to see choices Invalid range "%c-%c" in transliteration operator Invalid separator character %c%c%c in PerlIO layer specification %s Invalid TOKEN object ignored @@ -423,7 +418,6 @@ Invalid type '%c' in unpack Invalid type ',' in %s 'j' not supported on this platform 'J' not supported on this platform -List form of piped open not implemented %lx Malformed UTF-8 character (fatal) Missing (suid) fd script name @@ -431,17 +425,12 @@ More than one argument to open More than one argument to open(,':%s') mprotect for %p %u failed with %d mprotect RW for %p %u failed with %d -No code specified for -%c -No directory specified for -I No such class field "%s" Not an XSUB reference Operator or semicolon missing before %c%s -Perl %s required (did you mean %s?)--this is only %s, stopped Perl %s required--this is only %s, stopped -Perls since %s too modern--this is %s, stopped ptr wrong %p != %p fl=%x nl=%p e=%p for %d Recompile perl with -DDEBUGGING to use -D switch (did you mean -d ?) -Recursive call to Perl_load_module in PerlIO_find_layer Reversed %c= operator Runaway prototype %s(%.0 @@ -472,9 +461,7 @@ The telldir() function is not implemented on NetWare Too deeply nested ()-groups in %s Too many args on %s line of "%s" U0 mode on a byte string -Unbalanced string table refcount: (%d) for "%s" Undefined top format called -Unexpected constant lvalue entersub entry via type/targ %d:%d Unicode non-character 0x%X Unstable directory path, current directory changed unexpectedly Unterminated compressed integer in unpack @@ -488,7 +475,6 @@ utf8 "\x%X" does not map to Unicode Value of logical "%s" too long. Truncating to %i bytes value of node is %d in Offset macro Variable "%c%s" is not imported -vector argument not supported with alpha versions Wide character Wide character in $/ Wide character in print -- 2.7.4