perldiag.html
来自「perl教程」· HTML 代码 · 共 1,387 行 · 第 1/5 页
HTML
1,387 行
</li>
<dt><strong><a name="item_can_27t_do_inplace_edit_on__25s_3a__25s">Can't do inplace edit on %s: %s</a></strong>
<dd>
<p>(S inplace) The creation of the new file failed for the indicated
reason.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_do_inplace_edit_without_backup">Can't do inplace edit without backup</a></strong>
<dd>
<p>(F) You're on a system such as MS-DOS that gets confused if you try
reading from a deleted (but still opened) file. You have to say
<code>-i.bak</code>, or some such.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_do_inplace_edit_3a__25s_would_not_be_uniqu">Can't do inplace edit: %s would not be unique</a></strong>
<dd>
<p>(S inplace) Your filesystem does not support filenames longer than 14
characters and Perl was unable to create a unique filename during
inplace editing with the <strong>-i</strong> switch. The file was ignored.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_do__7bn_2cm_7d_with_n__3e_m_in_regex_3b_ma">Can't do {n,m} with n > m in regex; marked by <-- HERE in m/%s/</a></strong>
<dd>
<p>(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 <-- HERE shows in the
regular expression about where the problem was discovered. See <a href="../../lib/Pod/perlre.html">the perlre manpage</a>.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_do_setegid_21">Can't do setegid!</a></strong>
<dd>
<p>(P) The <a href="#item_setegid"><code>setegid()</code></a> call failed for some reason in the setuid emulator of
suidperl.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_do_seteuid_21">Can't do seteuid!</a></strong>
<dd>
<p>(P) The setuid emulator of suidperl failed for some reason.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_do_setuid">Can't do setuid</a></strong>
<dd>
<p>(F) This typically means that ordinary perl tried to exec suidperl to do
setuid emulation, but couldn't exec it. It looks for a name of the form
sperl5.000 in the same directory that the perl executable resides under
the name perl5.000, typically /usr/local/bin on Unix machines. If the
file is there, check the execute permissions. If it isn't, ask your
sysadmin why he and/or she removed it.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_do_waitpid_with_flags">Can't do waitpid with flags</a></strong>
<dd>
<p>(F) This machine doesn't have either <a href="../../lib/Pod/perlfunc.html#item_waitpid"><code>waitpid()</code></a> or wait4(), so only
<a href="../../lib/Pod/perlfunc.html#item_waitpid"><code>waitpid()</code></a> without flags is emulated.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_emulate__2d_25s_on__23_21_line">Can't emulate -%s on #! line</a></strong>
<dd>
<p>(F) The #! line specifies a switch that doesn't make sense at this
point. For example, it'd be kind of silly to put a <strong>-x</strong> on the #!
line.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_exec__22_25s_22_3a__25s">Can't exec "%s": %s</a></strong>
<dd>
<p>(W exec) A system(), exec(), or piped open call could not execute the
named program for the indicated reason. Typical reasons include: the
permissions were wrong on the file, the file wasn't found in
<code>$ENV{PATH}</code>, the executable in question was compiled for another
architecture, or the #! line in a script points to an interpreter that
can't be run for similar reasons. (Or maybe your system doesn't support
#! at all.)</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_exec__25s">Can't exec %s</a></strong>
<dd>
<p>(F) Perl was trying to execute the indicated program for you because
that's what the #! line said. If that's not what you wanted, you may
need to mention "perl" on the #! line somewhere.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_execute__25s">Can't execute %s</a></strong>
<dd>
<p>(F) You used the <strong>-S</strong> switch, but the copies of the script to execute
found in the PATH did not have correct permissions.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_find_an_opnumber_for__22_25s_22">Can't find an opnumber for "%s"</a></strong>
<dd>
<p>(F) A string of a form <code>CORE::word</code> was given to prototype(), but there
is no builtin with the name <code>word</code>.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_find__25s_character_property__22_25s_22">Can't find %s character property "%s"</a></strong>
<dd>
<p>(F) You used <code>\p{}</code> or <code>\P{}</code> but the character property by that name
could not be found. Maybe you misspelled the name of the property
(remember that the names of character properties consist only of
alphanumeric characters), or maybe you forgot the <code>Is</code> or <code>In</code> prefix?</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_find_label__25s">Can't find label %s</a></strong>
<dd>
<p>(F) You said to goto a label that isn't mentioned anywhere that it's
possible for us to go to. See <a href="../../lib/Pod/perlfunc.html#goto">goto in the perlfunc manpage</a>.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_find__25s_on_path">Can't find %s on PATH</a></strong>
<dd>
<p>(F) You used the <strong>-S</strong> switch, but the script to execute could not be
found in the PATH.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_find__25s_on_path_2c__27_2e_27_not_in_path">Can't find %s on PATH, '.' not in PATH</a></strong>
<dd>
<p>(F) You used the <strong>-S</strong> switch, but the script to execute could not be
found in the PATH, or at least not with the correct permissions. The
script exists in the current directory, but PATH prohibits running it.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_find__25s_property_definition__25s">Can't find %s property definition %s</a></strong>
<dd>
<p>(F) You may have tried to use <code>\p</code> which means a Unicode property (for
example <code>\p{Lu}</code> is all uppercase letters). If you did mean to use a
Unicode property, see <a href="../../lib/Pod/perlunicode.html">the perlunicode manpage</a> for the list of known properties.
If you didn't mean to use a Unicode property, escape the <code>\p</code>, either
by <code>\\p</code> (just the <code>\p</code>) or by <code>\Q\p</code> (the rest of the string, until
possible <code>\E</code>).</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_find_string_terminator__25s_anywhere_befor">Can't find string terminator %s anywhere before EOF</a></strong>
<dd>
<p>(F) Perl strings can stretch over multiple lines. This message means
that the closing delimiter was omitted. Because bracketed quotes count
nesting levels, the following is missing its final parenthesis:</p>
</dd>
<dd>
<pre>
print q(The character '(' starts a side comment.);</pre>
</dd>
<dd>
<p>If you're getting this error from a here-document, you may have included
unseen whitespace before or after your closing tag. A good programmer's
editor will have a way to help you find these characters.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_fork">Can't fork</a></strong>
<dd>
<p>(F) A fatal error occurred while trying to fork while opening a
pipeline.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_get_filespec__2d_stale_stat_buffer_3f">Can't get filespec - stale stat buffer?</a></strong>
<dd>
<p>(S) A warning peculiar to VMS. This arises because of the difference
between access checks under VMS and under the Unix model Perl assumes.
Under VMS, access checks are done by filename, rather than by bits in
the stat buffer, so that ACLs and other protections can be taken into
account. Unfortunately, Perl assumes that the stat buffer contains all
the necessary information, and passes it, instead of the filespec, to
the access checking routine. It will try to retrieve the filespec using
the device name and FID present in the stat buffer, but this works only
if you haven't made a subsequent call to the CRTL <a href="#item_stat"><code>stat()</code></a> routine,
because the device name is overwritten with each call. If this warning
appears, the name lookup failed, and the access checking routine gave up
and returned FALSE, just to be conservative. (Note: The access checking
routine knows about the Perl <a href="#item_stat"><code>stat</code></a> operator and file tests, so you
shouldn't ever see this warning in response to a Perl command; it arises
only if some internal code takes stat buffers lightly.)</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_get_pipe_mailbox_device_name">Can't get pipe mailbox device name</a></strong>
<dd>
<p>(P) An error peculiar to VMS. After creating a mailbox to act as a
pipe, Perl can't retrieve its name for later use.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_get_sysgen_parameter_value_for_maxbuf">Can't get SYSGEN parameter value for MAXBUF</a></strong>
<dd>
<p>(P) An error peculiar to VMS. Perl asked $GETSYI how big you want your
mailbox buffers to be, and didn't get an answer.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t__22goto_22_into_the_middle_of_a_foreach_lo">Can't "goto" into the middle of a foreach loop</a></strong>
<dd>
<p>(F) A "goto" statement was executed to jump into the middle of a foreach
loop. You can't get there from here. See <a href="../../lib/Pod/perlfunc.html#goto">goto in the perlfunc manpage</a>.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t__22goto_22_out_of_a_pseudo_block">Can't "goto" out of a pseudo block</a></strong>
<dd>
<p>(F) A "goto" statement was executed to jump out of what might look like
a block, except that it isn't a proper block. This usually occurs if
you tried to jump out of a <a href="../../lib/Pod/perlfunc.html#item_sort"><code>sort()</code></a> block or subroutine, which is a no-no.
See <a href="../../lib/Pod/perlfunc.html#goto">goto in the perlfunc manpage</a>.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_goto_subroutine_from_an_eval_2d_25s">Can't goto subroutine from an eval-%s</a></strong>
<dd>
<p>(F) The "goto subroutine" call can't be used to jump out of an eval
"string" or block.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_goto_subroutine_outside_a_subroutine">Can't goto subroutine outside a subroutine</a></strong>
<dd>
<p>(F) The deeply magical "goto subroutine" call can only replace one
subroutine call for another. It can't manufacture one out of whole
cloth. In general you should be calling it out of only an AUTOLOAD
routine anyway. See <a href="../../lib/Pod/perlfunc.html#goto">goto in the perlfunc manpage</a>.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_ignore_signal_chld_2c_forcing_to_default">Can't ignore signal CHLD, forcing to default</a></strong>
<dd>
<p>(W signal) Perl has detected that it is being run with the SIGCHLD
signal (sometimes known as SIGCLD) disabled. Since disabling this
signal will interfere with proper determination of exit status of child
processes, Perl has reset the signal to its default value. This
situation typically indicates that the parent program under which Perl
may be running (e.g. cron) is being very careless.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t__22last_22_outside_a_loop_block">Can't "last" outside a loop block</a></strong>
<dd>
<p>(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, as doesn't a block given to sort(), <a href="../../lib/Pod/perlfunc.html#item_map"><code>map()</code></a> or grep(). You can
usually double the curlies to get the same effect though, because the
inner curlies will be considered a block that loops once. See
<a href="../../lib/Pod/perlfunc.html#last">last in the perlfunc manpage</a>.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_load__27_25s_27_for_module__25s">Can't load '%s' for module %s</a></strong>
<dd>
<p>(F) The module you tried to load failed to load a dynamic extension. This
may either mean that you upgraded your version of perl to one that is
incompatible with your old dynamic extensions (which is known to happen
between major versions of perl), or (more likely) that your dynamic
extension was built against an older version of the library that is
installed on your system. You may need to rebuild your old dynamic
extensions.</p>
</dd>
</li>
<dt><strong><a name="item_can_27t_localize_lexical_variable__25s">Can't localize lexical variable %s</a></strong>
<dd>
<p>(F) You used local on a variable name that was previously declared as a
lexical variable using "my". This is not allowed. If you want to
localize a package variable of the same name, qualify it with the
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?