perldiag.pod

来自「ARM上的如果你对底层感兴趣」· POD 代码 · 共 1,753 行 · 第 1/5 页

POD
1,753
字号
a reference to a pseudo-hash.  That hasn't been implemented yet, but
you can get a similar effect by localizing the corresponding array
element directly -- C<local $ar-E<gt>[$ar-E<gt>[0]{'key'}]>.

=item Can't locate auto/%s.al in @INC

(F) A function (or method) was called in a package which allows autoload,
but there is no function to autoload.  Most probable causes are a misprint
in a function/method name or a failure to C<AutoSplit> the file, say, by
doing C<make install>.

=item Can't locate %s in @INC

(F) You said to do (or require, or use) a file that couldn't be found
in any of the libraries mentioned in @INC.  Perhaps you need to set the
PERL5LIB or PERL5OPT environment variable to say where the extra library
is, or maybe the script needs to add the library name to @INC.  Or maybe
you just misspelled the name of the file.  See L<perlfunc/require>.

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

=item Can't locate package %s for @%s::ISA

(W) The @ISA array contained the name of another package that doesn't seem
to exist.

=item Can't make list assignment to \%ENV on this system

(F) List assignment to %ENV is not supported on some systems, notably VMS.

=item Can't modify %s in %s

(F) You aren't allowed to assign to the item indicated, or otherwise try to
change it, such as with an auto-increment.

=item Can't modify nonexistent substring

(P) The internal routine that does assignment to a substr() was handed
a NULL.

=item Can't msgrcv to read-only var

(F) The target of a msgrcv must be modifiable to be used as a receive
buffer.

=item Can't open %s: %s

(S) The implicit opening of a file through use of the C<E<lt>E<gt>>
filehandle, either implicitly under the C<-n> or C<-p> command-line
switches, or explicitly, failed for the indicated reason.  Usually this
is because you don't have read permission for a file which you named
on the command line.

=item Can't open bidirectional pipe

(W) You tried to say C<open(CMD, "|cmd|")>, which is not supported.  You can
try any of several modules in the Perl library to do this, such as
IPC::Open2.  Alternately, direct the pipe's output to a file using "E<gt>",
and then read it in under a different file handle.

=item Can't open error file %s as stderr

(F) An error peculiar to VMS.  Perl does its own command line redirection, and
couldn't open the file specified after '2E<gt>' or '2E<gt>E<gt>' on the
command line for writing.

=item Can't open input file %s as stdin

(F) An error peculiar to VMS.  Perl does its own command line redirection, and
couldn't open the file specified after 'E<lt>' on the command line for reading.

=item Can't open output file %s as stdout

(F) An error peculiar to VMS.  Perl does its own command line redirection, and
couldn't open the file specified after 'E<gt>' or 'E<gt>E<gt>' on the command
line for writing.

=item Can't open output pipe (name: %s)

(P) An error peculiar to VMS.  Perl does its own command line redirection, and
couldn't open the pipe into which to send data destined for stdout.

=item Can't open perl script "%s": %s

(F) The script you specified can't be opened for the indicated reason.

=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<sort { &func } @x> instead of C<sort func @x>.

=item Can't rename %s to %s: %s, skipping file

(S) The rename done by the B<-i> switch failed for some reason, probably because
you don't have write permission to the directory.

=item Can't reopen input pipe (name: %s) in binary mode

(P) An error peculiar to VMS.  Perl thought stdin was a pipe, and tried to
reopen it to accept binary data.  Alas, it failed.

=item Can't reswap uid and euid

(P) The setreuid() call failed for some reason in the setuid emulator
of suidperl.

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

=item Can't stat script "%s"

(P) For some reason you can't fstat() the script even though you have
it open already.  Bizarre.

=item Can't swap uid and euid

(P) The setreuid() call failed for some reason in the setuid emulator
of suidperl.

=item Can't take log of %g

(F) For ordinary real numbers, you can't take the logarithm of a
negative number or zero. There's a Math::Complex package that comes
standard with Perl, though, if you really want to do that for
the negative numbers.

=item Can't take sqrt of %g

(F) For ordinary real numbers, you can't take the square root of a
negative number.  There's a Math::Complex package that comes standard
with Perl, though, if you really want to do that.

=item Can't undef active subroutine

(F) You can't undefine a routine that's currently running.  You can,
however, redefine it while it's running, and you can even undef the
redefined subroutine while the old routine is running.  Go figure.

=item Can't unshift

(F) You tried to unshift an "unreal" array that can't be unshifted, such
as the main Perl stack.

=item Can't upgrade that kind of scalar

(P) The internal sv_upgrade routine adds "members" to an SV, making
it 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 upgrade to undef

(P) The undefined SV is the bottom of the totem pole, in the scheme
of upgradability.  Upgrading to undef indicates an error in the
code calling sv_upgrade.

=item Can't use %%! because Errno.pm is not available

(F) The first time the %! hash is used, perl automatically loads the
Errno.pm module. The Errno module is expected to tie the %! hash to
provide symbolic names for C<$!> errno values.

=item Can't use "my %s" in sort comparison

(F) The global variables $a and $b are reserved for sort comparisons.
You mentioned $a or $b in the same line as the E<lt>=E<gt> or cmp operator,
and the variable had earlier been declared as a lexical variable.
Either qualify the sort variable with the package name, or rename the
lexical variable.

=item Can't use %s for loop variable

(F) Only a simple scalar variable may be used as a loop variable on a foreach.

=item Can't use %s ref as %s ref

(F) You've mixed up your reference types.  You have to dereference a
reference of the type needed.  You can use the ref() function to
test the type of the reference, if need be.

=item Can't use \1 to mean $1 in expression

(W) In an ordinary expression, backslash is a unary operator that creates
a reference to its argument.  The use of backslash to indicate a backreference
to a matched substring is valid only as part of a regular expression pattern.
Trying to do this in ordinary Perl code produces a value that prints
out looking like SCALAR(0xdecaf).  Use the $1 form instead.

=item Can't use bareword ("%s") as %s ref while \"strict refs\" in use

(F) Only hard references are allowed by "strict refs".  Symbolic references
are disallowed.  See L<perlref>.

=item Can't use string ("%s") as %s ref while "strict refs" in use

(F) Only hard references are allowed by "strict refs".  Symbolic references
are disallowed.  See L<perlref>.

=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 global %s in "my"

(F) You tried to declare a magical variable as a lexical variable.  This is
not allowed, because the magic can be tied to only one location (namely
the global variable) and it would be incredibly confusing to have
variables in your program that looked like magical variables but
weren't.

=item Can't use subscript on %s

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

=item Can't x= to read-only value

(F) You tried to repeat a constant value (often the undefined value) with
an assignment operator, which implies modifying the value itself.
Perhaps you need to copy the value to a temporary, and repeat that.

=item Cannot find an opnumber for "%s"

(F) A string of a form C<CORE::word> was given to prototype(), but
there is no builtin with the name C<word>.

=item Cannot resolve method `%s' overloading `%s' in package `%s'

(F|P) Error resolving overloading specified by a method name (as
opposed to a subroutine reference): no such method callable via the
package. If method name is C<???>, this is an internal error.

=item Character class syntax [. .] is reserved for future extensions

(W) 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) 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) 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 chmod: mode argument is missing initial 0

(W) A novice will sometimes say

    chmod 777, $filename

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 E<lt>%sE<gt>

(W) You tried to close a filehandle that was never opened.

=item Compilation failed in require

(F) Perl could not compile a file specified in a C<require> statement.
Perl uses this generic message when none of the errors that it encountered
were severe enough to halt compilation immediately.

=item Complex regular subexpression recursion limit (%d) exceeded

(W) The regular expression engine uses recursion in complex situations
where back-tracking is required.  Recursion depth is limited to 32766,
or perhaps less in architectures where the stack cannot grow
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<while>) rather
than in the regular expression engine; or rewriting the regular
expression so that it is simpler or backtracks less.  (See L<perlbook>
for information on I<Mastering Regular Expressions>.)

=item connect() on closed fd

(W) You tried to do a connect on a closed socket.  Did you forget to check
the return value of your socket() call?  See L<perlfunc/connect>.

=item Constant subroutine %s redefined

(S) You redefined a subroutine which had previously been eligible for
inlining.  See L<perlsub/"Constant Functions"> for commentary and
workarounds.

=item Constant subroutine %s undefined

(S) You undefined a subroutine which had previously been eligible for
inlining.  See L<perlsub/"Constant Functions"> for commentary and
workarounds.

=item Copy method did not return a reference

(F) The method which overloads "=" is buggy. See L<overload/Copy Constructor>.

=item Corrupt malloc ptr 0x%lx at 0x%lx

(P) The malloc package that comes with Perl had an internal failure.

=item corrupted regexp pointers

(P) The regular expression engine got confused by what the regular
expression compiler gave it.

=item corrupted regexp program

(P) The regular expression engine got passed a regexp program without
a valid magic number.

=item Deep recursion on subroutine "%s"

(W) This subroutine has called itself (directly or indirectly) 100
times more than it has returned.  This probably indicates an infinite
recursion, unless you're writing strange benchmark programs, in which
case it indicates something else.

=item Delimiter for here document is too long

(F) In a here document construct like C<E<lt>E<lt>FOO>, the label
C<FOO> is too long for Perl to handle.  You have to be seriously
twisted to write code that triggers this error.

=item Did you mean &%s instead?

(W) You probably referred to an imported subroutine &FOO as $FOO or some such.

=item Did you mean $ or @ instead of %?

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?