发信人: saka.bbs@bbs.neu.edu.cn (机器猫), 信区: cnlinux
标  题: perl(6)
发信站: 白山黑水BBS (Tue Apr  1 11:18:57 1997)
转信站: Lilac!ustcnews!ustcnews!sjtunews!neubbs
出  处: conger.neu.edu.cn

--------------37FB6C9769C9
Content-Type: text/plain; charset=us-ascii; name="perldiag.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="perldiag.txt"

NAME

perldiag - various Perl diagnostics

---------------------------------------------------------------------------

DESCRIPTION

These messages are classified as follows (listed in increasing order of
desperation):

    (W) A warning (optional).
    (D) A deprecation (optional).
    (S) A severe warning (mandatory).
    (F) A fatal error (trappable).
    (P) An internal error you should never see (trappable).
    (X) A very fatal error (non-trappable).
    (A) An alien error message (not generated by Perl).

Optional warnings are enabled by using the -w switch. Warnings may be
captured by setting $^ Q to a reference to a routine that will be called on
each warning instead of printing it. See the perlvar manpage . Trappable
errors may be trapped using the eval operator. See eval .

Some of these messages are generic. Spots that vary are denoted with a %s ,
just as in a printf format. Note that some message start with a %s ! The
symbols "%-?@ sort before the letters, while [ and \ sort after.

``my'' variable %s can't be in a package
     (F) Lexically scoped variables aren't in a package, so it doesn't make
     sense to try to declare one with a package qualifier on the front. Use
     local() if you want to localize a package variable.

``no'' not allowed in expression
     (F) The ``no'' keyword is recognized and executed at compile time, and
     returns no useful value. See the perlmod manpage .

``use'' not allowed in expression
     (F) The ``use'' keyword is recognized and executed at compile time,
     and returns no useful value. See the perlmod manpage .

% may only be used in unpack
     (F) You can't pack a string by supplying a checksum, since the
     checksumming process loses information, and you can't go the other
     way. See unpack .

%s (...) interpreted as function
     (W) You've run afoul of the rule that says that any list operator
     followed by parentheses turns into a function, with all the list
     operators arguments found inside the parens. See Terms and List
     Operators (Leftward) .

%s argument is not a HASH element
     (F) The argument to delete() or exists() must be a hash element, such
     as

         $foo{$bar}
         $ref->[12]->{"susie"}

%s did not return a true value
     (F) A required (or used) file must return a true value to indicate
     that it compiled correctly and ran its initialization code correctly.
     It's traditional to end such a file with a ``1;'', though any true
     value would do. See require .

%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
     operator, it gives you this warning. Usually it indicates that an
     operator or delimiter was omitted, such as a semicolon.

%s had compilation errors.
     (F) The final summary message when a perl -c fails.

%s has too many errors.
     (F) The parser has given up trying to parse the program after 10
     errors. Further error messages would likely be uninformative.

%s matches null string many times
     (W) The pattern you've specified would be an infinite loop if the
     regular expression engine didn't specifically check for that. See the
     perlre manpage .

%s never introduced
     (S) The symbol in question was declared but somehow went out of scope
     before it could possibly have been used.

%s syntax OK
     (F) The final summary message when a perl -c succeeds.

%s: Command not found.
     (A) You've accidentally run your script through csh instead of Perl.
     Check the <#!> line, or manually feed your script into Perl yourself.

%s: Expression syntax.
     (A) You've accidentally run your script through csh instead of Perl.
     Check the <#!> line, or manually feed your script into Perl yourself.

%s: Undefined variable.
     (A) You've accidentally run your script through csh instead of Perl.
     Check the <#!> line, or manually feed your script into Perl yourself.

%s: not found
     (A) You've accidentally run your script through the Bourne shell
     instead of Perl. Check the <#!> line, or manually feed your script
     into Perl yourself.

-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.

-T and -B not implemented on filehandles
     (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.

?+* follows nothing in regexp
     (F) You started a regular expression with a quantifier. Backslash it
     if you meant it literally. See the perlre manpage .

@ outside of string
     (F) You had a pack template that specified an absolution position
     outside the string being unpacked. See pack .

accept() on closed fd
     (W) You tried to do an accept on a closed socket. Did you forget to
     check the return value of your socket() call? See accept .

Allocation too large: %lx
     (F) You can't allocate more than 64K on an MSDOS machine.

Arg too short for msgsnd
     (F) msgsnd() requires a string at least as long as sizeof(long).

Ambiguous use of %s resolved as %s
     (W)(S) You said something that may not be interpreted the way you
     thought. Normally it's pretty easy to disambiguate it by supplying a
     missing quote, operator, paren pair or declaration.

Args must match #! line
     (F) The setuid emulator requires that the arguments Perl was invoked
     with match the arguments specified on the #! line.

Argument `` %s '' isn't numeric
     (W) 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.

Array @%s missing the @ in argument %d of %<EM>s()
     (D) Really old Perl let you omit the @ on array names in some spots.
     This is now heavily deprecated.

assertion botched: %s
     (P) The malloc package that comes with Perl had an internal failure.

Assertion failed: file `` %s ''
     (P) A general assertion failed. The file in question must be examined.

Assignment to both a list and a scalar
     (F) If you assign to a conditional operator, the 2nd and 3rd arguments
     must either both be scalars or both be lists. Otherwise Perl won't
     know which context to supply to the right side.

Attempt to free non-arena SV: 0x%lx
     (P) All SV objects are supposed to be allocated from arenas that will
     be garbage collected on exit. An SV was discovered to be outside any
     of those arenas.

Attempt to free temp prematurely
     (W) Mortalized values are supposed to be freed by the free_tmps()
     routine. This indicates that something else is freeing the SV before
     the free_tmps() routine gets a chance, which means that the
     free_tmps() routine will be freeing an unreferenced scalar when it
     does try to free it.

Attempt to free unreferenced glob pointers
     (P) The reference counts got screwed up on symbol aliases.

Attempt to free unreferenced scalar
     (W) Perl went to decrement the reference count of a scalar to see if
     it would go to 0, and discovered that it had already gone to 0
     earlier, and should have been freed, and in fact, probably was freed.
     This could indicate that SvREFCNT_dec() was called too many times, or
     that SvREFCNT_inc() was called too few times, or that the SV was
     mortalized when it shouldn't have been, or that memory has been
     corrupted.

Bad arg length for %s , is %d, should be %d
     (F) You passed a buffer of the wrong size to one of msgctl() ,
     semctl() or shmctl() . In C parlance, the correct sized are,
     respectively, sizeof(struct msqid_ds *), sizeof(struct semid_ds *) and
     sizeof(struct shmid_ds *).

Bad associative array
     (P) One of the internal hash routines was passed a null HV pointer.

Bad filehandle: %s
     (F) A symbol was passed to something wanting a filehandle, but the
     symbol has no filehandle associated with it. Perhaps you didn't do an
     open() , or did it in another package.

Bad free() ignored
     (S) An internal routine called free() on something that had never been
     malloc()ed in the first place.

Bad name after %s::
     (F) You started to name a symbol by using a package prefix, and then
     didn't finish the symbol. In particular, you can't interpolate outside
     of quotes, so

         $var = 'myvar';
         $sym = mypack::$var;

     is not the same as

         $var = 'myvar';
         $sym = "mypack::$var";

Bad symbol for array
     (P) An internal request asked to add an array entry to something that
     wasn't a symbol table entry.

Bad symbol for filehandle
     (P) An internal request asked to add a filehandle entry to something
     that wasn't a symbol table entry.

Bad symbol for hash
     (P) An internal request asked to add a hash entry to something that
     wasn't a symbol table entry.

Badly places ()'s
     (A) You've accidentally run your script through csh instead of Perl.
     Check the <#!> line, or manually feed your script into Perl yourself.

BEGIN failed--compilation aborted
     (F) An untrapped exception was raised while executing a BEGIN
     subroutine. Compilation stops immediately and the interpreter is
     exited.

bind() on closed fd
     (W) You tried to do a bind on a closed socket. Did you forget to check
     the return value of your socket() call? See bind .

Bizarre copy of %s in %s
     (P) Perl detected an attempt to copy an internal value that is not
     copiable.

Callback called exit
     (F) A subroutine invoked from an external package via perl_call_sv()
     exited by calling exit.

Can't ``last'' outside a block
     (F) A ``last'' statement was executed to break out of the current
     block, except that there's this itty bitty problem called there isn't
     a current block. Note that an ``if'' or ``else'' block doesn't count
     as a ``loopish'' block. You can usually double the curlies to get the
     same effect though, since the inner curlies will be considered a block
     that loops once. See last .

Can't ``next'' outside a block
     (F) A ``next'' statement was executed to reiterate the current block,
     but there isn't a current block. Note that an ``if'' or ``else'' block
     doesn't count as a ``loopish'' block. You can usually double the
     curlies to get the same effect though, since the inner curlies will be
     considered a block that loops once. See last .

Can't ``redo'' outside a block
     (F) A ``redo'' statement was executed to restart the current block,
     but there isn't a current block. Note that an ``if'' or ``else'' block
     doesn't count as a ``loopish'' block. You can usually double the
     curlies to get the same effect though, since the inner curlies will be
     considered a block that loops once. See last .

Can't bless non-reference value
     (F) Only hard references may be blessed. This is how Perl ``enforces''
     encapsulation of objects. See the perlobj manpage .

Can't break at that line
     (S) A warning intended for while running within the debugger,
     indicating the line number specified wasn't the location of a
     statement that could be stopped at.

Can't call method `` %s '' in empty package `` %s ''
     (F) You called a method correctly, and it correctly indicated a
     package functioning as a class, but that package doesn't have ANYTHING
     defined in it, let alone methods. See the perlobj manpage .

Can't call method `` %s '' on unblessed reference
     (F) A method call must know what package it's supposed to run in. It
     ordinarily finds this out from the object reference you supply, but
     you didn't supply an object reference in this case. A reference isn't
     an object reference until it has been blessed. See the perlobj manpage
     .

Can't call method `` %s '' without a package or object reference
     (F) You used the syntax of a method call, but the slot filled by the
     object reference or package name contains an expression that returns
     neither an object reference nor a package name. (Perhaps it's null?)
     Something like this will reproduce the error:

         $BADREF = undef;
         process $BADREF 1,2,3;
         $BADREF->process(1,2,3);

Can't chdir to %s
     (F) You called perl -x/foo/bar, but /foo/bar is not a directory that
     you can chdir to, possibly because it doesn't exist.

Can't coerce %s to integer in %s
     (F) Certain types of SVs, in particular real symbol tabl

--------------37FB6C9769C9--

--
※ 来源:.白山黑水站 bbs.neu.edu.cn.[FROM: ygh@rose.dlut.edu.cn]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:217.275毫秒