📄 ch33_01.htm
字号:
means that the <tt class="literal">free_tmps</tt> routine will be freeing an unreferencedscalar when it does try to free it.</p></dd><dt><b><tt class="literal">Attempt to free unreferenced glob pointers</tt></b></dt><dd><p>(P internal) The reference counts got screwed up on symbol aliases.</p></dd><dt><b><tt class="literal">Attempt to free unreferenced scalar</tt></b></dt><dd><p>(W internal) Perl went to decrement the reference count of a scalar tosee if it would go to 0, and discovered that it had already gone to 0earlier and should have been freed and, in fact, probably was freed.This could indicate that <tt class="literal">SvREFCNT_dec</tt> was called too many times, orthat <tt class="literal">SvREFCNT_inc</tt> was called too few times, or that the SV wasmortalized when it shouldn't have been, or that memory has beencorrupted.</p></dd><dt><b><tt class="literal">Attempt to join self</tt></b></dt><dd><p>(F) You tried to join a thread from within itself, which is animpossible task. You may be joining the wrong thread, or you mayneed to move the <tt class="literal">join</tt> to some other thread.</p></dd><dt><b><tt class="literal">Attempt to pack pointer to temporary value</tt></b></dt><dd><p>(W pack) You tried to pass a temporary value (like the result of afunction, or a computed expression) to the <tt class="literal">p</tt> template of <tt class="literal">pack</tt>template. This means the result contains a pointer to a location thatcould become invalid anytime, even before the end of the currentstatement. Use literals or global values as arguments to the <tt class="literal">p</tt>template of <tt class="literal">pack</tt> to avoid this warning.</p></dd><dt><b><tt class="literal">Attempt to use reference as lvalue in substr</tt></b></dt><dd><p>(W substr) You supplied a reference as the first argument to <tt class="literal">substr</tt>used as an lvalue, which is pretty strange. Perhaps you forgot todereference it first.</p></dd><dt><b><tt class="literal">Bad arg length for</tt> <em class="replaceable">%s</em><tt class="literal">, is</tt> <em class="replaceable">%d</em><tt class="literal">, should be</tt> <em class="replaceable">%d</em></b></dt><dd><p>(F) You passed a buffer of the wrong size to one of <tt class="literal">msgctl</tt>, <tt class="literal">semctl</tt> or<tt class="literal">shmctl</tt>. In C parlance, the correct sizes are, respectively,<tt class="literal">sizeof(struct msqid_ds *)</tt>, <tt class="literal">sizeof(struct semid_ds *)</tt>, and<tt class="literal">sizeof(struct shmid_ds *)</tt>.</p></dd><dt><b><tt class="literal">Bad filehandle:</tt> <em class="replaceable">%s</em></b></dt><dd><p>(F) A symbol was passed to something wanting a filehandle, but thesymbol has no filehandle associated with it. Perhaps you didn't do an<tt class="literal">open</tt>, or did it in another package.</p></dd><dt><b><tt class="literal">Bad free() ignored</tt></b></dt><dd><p>(S malloc) An internal routine called <tt class="literal">free</tt> on something that hadnever been <tt class="literal">malloc</tt>ed in the first place. Mandatory, but can bedisabled by setting environment variable <tt class="literal">PERL_BADFREE</tt> to 1.</p><p>This message can be seen quite often with <tt class="literal">DB_File</tt> on systems with"hard" dynamic linking, like AIX and OS/2. It's a bug inBerkeley DB.</p></dd><dt><b><tt class="literal">Bad hash</tt></b></dt><dd><p>(P) One of the internal hash routines was passed a null HV pointer.</p></dd><dt><b><tt class="literal">Bad index while coercing array into hash</tt></b></dt><dd><p>(F) The index looked up in the hash found as the 0th element of apseudohash is not legal. Index values must be 1 or greater.</p></dd><dt><b><tt class="literal">Bad name after</tt> <em class="replaceable">%s</em><tt class="literal">::</tt></b></dt><dd><p>(F) You started to name a symbol by using a package prefix and then didn'tfinish the symbol. In particular, you can't interpolate outside of quotes,so:<blockquote><pre class="programlisting">$var = 'myvar';$sym = mypack::$var;</pre></blockquote>is not the same as:<blockquote><pre class="programlisting">$var = 'myvar';$sym = "mypack::$var";</pre></blockquote></p></dd><dt><b><tt class="literal">Bad realloc() ignored</tt></b></dt><dd><p>(S malloc) An internal routine called <tt class="literal">realloc</tt> on something that hadnever been <tt class="literal">malloc</tt>ed in the first place. Mandatory, but can bedisabled by setting environment variable <tt class="literal">PERL_BADFREE</tt> to 1.</p></dd><dt><b><tt class="literal">Bad symbol for array</tt></b></dt><dd><p>(P) An internal request asked to add an array entry to something thatwasn't a symbol table entry.</p></dd><dt><b><tt class="literal">Bad symbol for filehandle</tt></b></dt><dd><p>(P) An internal request asked to add a filehandle entry to somethingthat wasn't a symbol table entry.</p></dd><dt><b><tt class="literal">Bad symbol for hash</tt></b></dt><dd><p>(P) An internal request asked to add a hash entry to something thatwasn't a symbol table entry.</p></dd><dt><b><tt class="literal">Badly placed ()'s</tt></b></dt><dd><p>(A) You've accidentally run your script through <em class="emphasis">csh</em> insteadof Perl. Check the <tt class="literal">#!</tt> line, or manually feed your script intoPerl yourself with <tt class="command">perl scriptname</tt>.</p></dd><dt><b><tt class="literal">Bareword "</tt><em class="replaceable">%s</em><tt class="literal">" not allowed while "strict subs" in use</tt></b></dt><dd><p>(F) With <tt class="literal">strict subs</tt> in use, a bareword is only allowed as asubroutine identifier, in curly brackets or to the left of the <tt class="literal">=></tt>symbol. Perhaps you need to predeclare a subroutine?</p></dd><dt><b><tt class="literal">Bareword "</tt><em class="replaceable">%s</em><tt class="literal">" refers to nonexistent package</tt></b></dt><dd><p>(W bareword) You used a qualified bareword of the form <tt class="literal">Foo::</tt>, butthe compiler saw no other uses of that namespace before that point. Perhaps you need to predeclare a package?</p></dd><dt><b><tt class="literal">Bareword found in conditional</tt></b></dt><dd><p>(W bareword) The compiler found a bareword where it expected aconditional, which often indicates that an <tt class="literal">||</tt> or <tt class="literal">&&</tt> was parsedas part of the last argument of the previous construct, for example:<blockquote><pre class="programlisting">open FOO || die;</pre></blockquote>It may also indicate a misspelled constant that has been interpretedas a bareword:<blockquote><pre class="programlisting">use constant TYPO => 1;if (TYOP) { print "foo" }</pre></blockquote>The <tt class="literal">strict</tt> pragma is useful in avoiding such errors.</p></dd><dt><b><tt class="literal">BEGIN failed--compilation aborted</tt></b></dt><dd><p>(F) An untrapped exception was raised while executing a <tt class="literal">BEGIN</tt>subroutine. Compilation stops immediately and the interpreter isexited.</p></dd><dt><b><tt class="literal">BEGIN not safe after errors--compilation aborted</tt></b></dt><dd><p>(F) Perl found a <tt class="literal">BEGIN</tt> subroutine (or a <tt class="literal">use</tt> directive, whichimplies a <tt class="literal">BEGIN</tt>) after one or more compilation errors hadalready occurred. Since the intended environment for the <tt class="literal">BEGIN</tt>could not be guaranteed (due to the errors), and since subsequent codelikely depends on its correct operation, Perl just gave up.</p></dd><dt><b><tt class="literal">Binary number > 0b11111111111111111111111111111111 non-portable</tt></b></dt><dd><p>(W portable) The binary number you specified is larger than <tt class="literal">2**32-1</tt>(4,294,967,295) and therefore nonportable between systems.</p></dd><dt><b><tt class="literal">bind() on closed socket</tt> <em class="replaceable">%s</em></b></dt><dd><p>(W closed) You tried to do a <tt class="literal">bind</tt> on a closed socket. Did youforget to check the return value of your <tt class="literal">socket</tt> call?</p></dd><dt><b><tt class="literal">Bit vector size > 32 non-portable</tt></b></dt><dd><p>(W portable) Using bit vector sizes larger than 32 is nonportable.</p></dd><dt><b><tt class="literal">Bizarre copy of</tt> <em class="replaceable">%s</em> <tt class="literal">in</tt> <em class="replaceable">%s</em></b></dt><dd><p>(P) Perl detected an attempt to copy an internal value that is not copiable.</p></dd><dt><b><tt class="literal">Buffer overflow in prime_env_iter:</tt> <em class="replaceable">%s</em></b></dt><dd><p>(W internal) A warning peculiar to VMS. While Perl was preparing toiterate over <tt class="literal">%ENV</tt>, it encountered a logical name or symbol definitionwhich was too long, so it was truncated to the string shown.</p></dd><dt><b><tt class="literal">Callback called exit</tt></b></dt><dd><p>(F) A subroutine invoked from an external package via <tt class="literal">call_sv</tt>exited by calling <tt class="literal">exit</tt>.</p></dd><dt><b><tt class="literal">Can't "goto" out of a pseudo block</tt></b></dt><dd><p>(F) A <tt class="literal">goto</tt> statement was executed to jump out of what might looklike a block, except that it isn't a proper block. This usuallyoccurs if you tried to jump out of a sort block or subroutine, whichis a no-no.</p></dd><dt><b><tt class="literal">Can't "goto" into the middle of a foreach loop</tt></b></dt><dd><p>(F) A <tt class="literal">goto</tt> statement was executed to jump into the middle of aforeach loop. You can't get there from here.</p></dd><dt><b><tt class="literal">Can't "last" outside a loop block</tt></b></dt><dd><p>(F) A <tt class="literal">last</tt> statement was executed to break out of the current block,except that there's this itty-bitty problem called there isn't acurrent block. Note that an <tt class="literal">if</tt> or <tt class="literal">else</tt> block doesn't count as a"loopish" block, nor does a block given to <tt class="literal">sort</tt>, <tt class="literal">map</tt>, or<tt class="literal">grep</tt>. You can usually double the curlies to get the same effect,though, because the inner curlies will be considered a block thatloops once.</p></dd><dt><b><tt class="literal">Can't "next" outside a loop block</tt></b></dt><dd><p>(F) A <tt class="literal">next</tt> statement was executed to reiterate the current block, butthere isn't a current block. Note that an <tt class="literal">if</tt> or <tt class="literal">else</tt> block doesn'tcount as a "loopish" block, nor does a block given to <tt class="literal">sort</tt>, <tt class="literal">map</tt>,or <tt class="literal">grep</tt>. You can usually double the curlies to get the same effectthough, because the inner curlies will be considered a block thatloops once.</p></dd><dt><b><tt class="literal">Can't read CRTL environ</tt></b></dt><dd><p>(S) This is a warning peculiar to VMS. Perl tried to read an element of<tt class="literal">%ENV</tt> from the CRTL's internal environment array and discovered thearray was missing. You need to figure out where your CRTL misplacedits environ or define <tt class="literal">PERL_ENV_TABLES</tt> (see <em class="emphasis">perlvms</em>(1)) so thatthe environ array is not searched.</p></dd><dt><b><tt class="literal">Can't "redo" outside a loop block</tt></b></dt><dd><p>(F) A <tt class="literal">redo</tt> statement was executed to restart the current block, butthere isn't a current block. Note that an <tt class="literal">if</tt> or <tt class="literal">else</tt> block doesn'tcount as a "loopish" block, nor does a block given to <tt class="literal">sort</tt>, <tt class="literal">map</tt>,or <tt class="literal">grep</tt>. You can usually double the curlies to get the same effectthough, because the inner curlies will be considered a block thatloops once.</p></dd><dt><b><tt class="literal">Can't bless non-reference value</tt></b></dt><dd><p>(F) Only hard references may be blessed. This is how Perl "enforces"encapsulation of objects.</p></dd><dt><b><tt class="literal">Can't break at that line</tt></b></dt><dd><p>(S internal) This warning is intended to be printed only while runningwithin the debugger, indicating the line number specified wasn't thelocation of a statement that could be stopped at.</p></dd>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -