perl581delta.html
来自「perl教程」· HTML 代码 · 共 1,197 行 · 第 1/4 页
HTML
1,197 行
you will like this warning.</p>
<p>
</p>
<h2><a name="new_pseudohashes_are_deprecated">New "Pseudo-hashes are deprecated"</a></h2>
<p>This warning should have been already in 5.8.0, since they are.</p>
<p>
</p>
<h2><a name="new_read___on__s_filehandle__s">New "read() on %s filehandle %s"</a></h2>
<p>You cannot <a href="../../lib/Pod/perlfunc.html#item_read"><code>read()</code></a> (or <a href="../../lib/Pod/perlfunc.html#item_sysread"><code>sysread())</code></a> from a closed or unopened filehandle.</p>
<p>
</p>
<h2><a name="new_5_005_threads_are_deprecated">New "5.005 threads are deprecated"</a></h2>
<p>This warning should have been already in 5.8.0, since they are.</p>
<p>
</p>
<h2><a name="new_tied_variable_freed_while_still_in_use">New "Tied variable freed while still in use"</a></h2>
<p>Something pulled the plug on a live tied variable, Perl plays
safe by bailing out.</p>
<p>
</p>
<h2><a name="new_to_s__illegal_mapping___s_">New "To%s: illegal mapping '%s'"</a></h2>
<p>An illegal user-defined Unicode casemapping was specified.</p>
<p>
</p>
<h2><a name="new_use_of_freed_value_in_iteration">New "Use of freed value in iteration"</a></h2>
<p>Something modified the values being iterated over. This is not good.</p>
<p>
</p>
<hr />
<h1><a name="changed_internals">Changed Internals</a></h1>
<p>These news matter to you only if you either write XS code or like to
know about or hack Perl internals (using Devel::Peek or any of the
<code>B::</code> modules counts), or like to run Perl with the <code>-D</code> option.</p>
<p>The embedding examples of <a href="../../lib/Pod/perlembed.html">the perlembed manpage</a> have been reviewed to be
uptodate and consistent: for example, the correct use of
<code>PERL_SYS_INIT3()</code> and PERL_SYS_TERM().</p>
<p>Extensive reworking of the pad code (the code responsible
for lexical variables) has been conducted by Dave Mitchell.</p>
<p>Extensive work on the v-strings by John Peacock.</p>
<p>UTF-8 length and position cache: to speed up the handling of Unicode
(UTF-8) scalars, a cache was introduced. Potential problems exist if
an extension bypasses the official APIs and directly modifies the PV
of an SV: the UTF-8 cache does not get cleared as it should.</p>
<p>APIs obsoleted in Perl 5.8.0, like sv_2pv, sv_catpvn, sv_catsv,
sv_setsv, are again available.</p>
<p>Certain Perl core C APIs like cxinc and regatom are no longer
available at all to code outside the Perl core of the Perl core
extensions. This is intentional. They never should have been
available with the shorter names, and if you application depends on
them, you should (be ashamed and) contact perl5-porters to discuss
what are the proper APIs.</p>
<p>Certain Perl core C APIs like <code>Perl_list</code> are no longer available
without their <code>Perl_</code> prefix. If your XS module stops working
because some functions cannot be found, in many cases a simple fix is
to add the <code>Perl_</code> prefix to the function and the thread context
<code>aTHX_</code> as the first argument of the function call. This is also how
it should always have been done: letting the Perl_-less forms to leak
from the core was an accident. For cleaner embedding you can also
force this for all APIs by defining at compile time the cpp define
PERL_NO_SHORT_NAMES.</p>
<p><code>Perl_save_bool()</code> has been added.</p>
<p>Regexp objects (those created with <code>qr</code>) now have S-magic rather than
R-magic. This fixed regexps of the form /...(??{...;$x})/ to no
longer ignore changes made to $x. The S-magic avoids dropping
the caching optimization and making (??{...}) constructs obscenely
slow (and consequently useless). See also <a href="../../lib/Pod/perlguts.html#magic_variables">Magic Variables in the perlguts manpage</a>.
Regexp::Copy was affected by this change.</p>
<p>The Perl internal debugging macros <code>DEBUG()</code> and <code>DEB()</code> have been renamed
to <code>PERL_DEBUG()</code> and <code>PERL_DEB()</code> to avoid namespace conflicts.</p>
<p><code>-DL</code> removed (the leaktest had been broken and unsupported for years,
use alternative debugging mallocs or tools like valgrind and Purify).</p>
<p>Verbose modifier <code>v</code> added for <code>-DXv</code> and <code>-Dsv</code>, see <a href="../../lib/Pod/perlrun.html">the perlrun manpage</a>.</p>
<p>
</p>
<hr />
<h1><a name="new_tests">New Tests</a></h1>
<p>In Perl 5.8.0 there were about 69000 separate tests in about 700 test files,
in Perl 5.8.1 there are about 77000 separate tests in about 780 test files.
The exact numbers depend on the Perl configuration and on the operating
system platform.</p>
<p>
</p>
<hr />
<h1><a name="known_problems">Known Problems</a></h1>
<p>The hash randomisation mentioned in <a href="#incompatible_changes">Incompatible Changes</a> is definitely
problematic: it will wake dormant bugs and shake out bad assumptions.</p>
<p>If you want to use mod_perl 2.x with Perl 5.8.1, you will need
mod_perl-1.99_10 or higher. Earlier versions of mod_perl 2.x
do not work with the randomised hashes. (mod_perl 1.x works fine.)
You will also need Apache::Test 1.04 or higher.</p>
<p>Many of the rarer platforms that worked 100% or pretty close to it
with perl 5.8.0 have been left a little bit untended since their
maintainers have been otherwise busy lately, and therefore there will
be more failures on those platforms. Such platforms include Mac OS
Classic, IBM z/OS (and other EBCDIC platforms), and NetWare. The most
common Perl platforms (Unix and Unix-like, Microsoft platforms, and
VMS) have large enough testing and expert population that they are
doing well.</p>
<p>
</p>
<h2><a name="tied_hashes_in_scalar_context">Tied hashes in scalar context</a></h2>
<p>Tied hashes do not currently return anything useful in scalar context,
for example when used as boolean tests:</p>
<pre>
<span class="keyword">if</span> <span class="operator">(</span><span class="variable">%tied_hash</span><span class="operator">)</span> <span class="operator">{</span> <span class="operator">...</span> <span class="operator">}</span>
</pre>
<p>The current nonsensical behaviour is always to return false,
regardless of whether the hash is empty or has elements.</p>
<p>The root cause is that there is no interface for the implementors of
tied hashes to implement the behaviour of a hash in scalar context.</p>
<p>
</p>
<h2><a name="net__ping_450_service_and_510_ping_udp_failures">Net::Ping 450_service and 510_ping_udp failures</a></h2>
<p>The subtests 9 and 18 of lib/Net/Ping/t/450_service.t, and the
subtest 2 of lib/Net/Ping/t/510_ping_udp.t might fail if you have
an unusual networking setup. For example in the latter case the
test is trying to send a UDP ping to the IP address 127.0.0.1.</p>
<p>
</p>
<h2><a name="b__c">B::C</a></h2>
<p>The C-generating compiler backend B::C (the frontend being
<code>perlcc -c</code>) is even more broken than it used to be because of
the extensive lexical variable changes. (The good news is that
B::Bytecode and ByteLoader are better than they used to be.)</p>
<p>
</p>
<hr />
<h1><a name="platform_specific_problems">Platform Specific Problems</a></h1>
<p>
</p>
<h2><a name="ebcdic_platforms">EBCDIC Platforms</a></h2>
<p>IBM z/OS and other EBCDIC platforms continue to be problematic
regarding Unicode support. Many Unicode tests are skipped when
they really should be fixed.</p>
<p>
</p>
<h2><a name="cygwin_1_5_problems">Cygwin 1.5 problems</a></h2>
<p>In Cygwin 1.5 the <em>io/tell</em> and <em>op/sysio</em> tests have failures for
some yet unknown reason. In 1.5.5 the threads tests stress_cv,
stress_re, and stress_string are failing unless the environment
variable PERLIO is set to "perlio" (which makes also the io/tell
failure go away).</p>
<p>Perl 5.8.1 does build and work well with Cygwin 1.3: with (uname -a)
<code>CYGWIN_NT-5.0 ... 1.3.22(0.78/3/2) 2003-03-18 09:20 i686 ...</code>
a 100% "make test" was achieved with <code>Configure -des -Duseithreads</code>.</p>
<p>
</p>
<h2><a name="hpux__hp_cc_warnings_about_sendfile_and_sendpath">HP-UX: HP cc warnings about sendfile and sendpath</a></h2>
<p>With certain HP C compiler releases (e.g. B.11.11.02) you will
get many warnings like this (lines wrapped for easier reading):</p>
<pre>
cc: "/usr/include/sys/socket.h", line 504: warning 562:
Redeclaration of "sendfile" with a different storage class specifier:
"sendfile" will have internal linkage.
cc: "/usr/include/sys/socket.h", line 505: warning 562:
Redeclaration of "sendpath" with a different storage class specifier:
"sendpath" will have internal linkage.</pre>
<p>The warnings show up both during the build of Perl and during certain
lib/ExtUtils tests that invoke the C compiler. The warning, however,
is not serious and can be ignored.</p>
<p>
</p>
<h2><a name="irix__t_uni_tr_7jis_t_falsely_failing">IRIX: t/uni/tr_7jis.t falsely failing</a></h2>
<p>The test t/uni/tr_7jis.t is known to report failure under 'make test'
or the test harness with certain releases of IRIX (at least IRIX 6.5
and MIPSpro Compilers Version 7.3.1.1m), but if run manually the test
fully passes.</p>
<p>
</p>
<h2><a name="mac_os_x__no_usemymalloc">Mac OS X: no usemymalloc</a></h2>
<p>The Perl malloc (<code>-Dusemymalloc</code>) does not work at all in Mac OS X.
This is not that serious, though, since the native malloc works just
fine.</p>
<p>
</p>
<h2><a name="tru64__no_threaded_builds_with_gnu_cc__gcc_">Tru64: No threaded builds with GNU cc (gcc)</a></h2>
<p>In the latest Tru64 releases (e.g. v5.1B or later) gcc cannot be used
to compile a threaded Perl (-Duseithreads) because the system
<code><pthread.h></code> file doesn't know about gcc.</p>
<p>
</p>
<h2><a name="win32__sysopen__sysread__syswrite">Win32: sysopen, sysread, syswrite</a></h2>
<p>As of the 5.8.0 release, <a href="../../lib/Pod/perlfunc.html#item_sysopen"><code>sysopen()/sysread()/syswrite()</code></a> do not behave
like they used to in 5.6.1 and earlier with respect to "text" mode.
These built-ins now always operate in "binary" mode (even if <a href="../../lib/Pod/perlfunc.html#item_sysopen"><code>sysopen()</code></a>
was passed the O_TEXT flag, or if <a href="../../lib/Pod/perlfunc.html#item_binmode"><code>binmode()</code></a> was used on the file
handle). Note that this issue should only make a difference for disk
files, as sockets and pipes have always been in "binary" mode in the
Windows port. As this behavior is currently considered a bug,
compatible behavior may be re-introduced in a future release. Until
then, the use of sysopen(), <a href="../../lib/Pod/perlfunc.html#item_sysread"><code>sysread()</code></a> and <a href="../../lib/Pod/perlfunc.html#item_syswrite"><code>syswrite()</code></a> is not supported
for "text" mode operations.</p>
<p>
</p>
<hr />
<h1><a name="future_directions">Future Directions</a></h1>
<p>The following things <strong>might</strong> happen in future. The first publicly
available releases having these characteristics will be the developer
releases Perl 5.9.x, culminating in the Perl 5.10.0 release. These
are our best guesses at the moment: we reserve the right to rethink.</p>
<ul>
<li>
<p>PerlIO will become The Default. Currently (in Perl 5.8.x) the stdio
library is still used if Perl thinks it can use certain tricks to
make stdio go <strong>really</strong> fast. For future releases our goal is to
make PerlIO go even faster.</p>
</li>
<li>
<p>A new feature called <em>assertions</em> will be available. This means that
one can have code called assertions sprinkled in the code: usually
they are optimised away, but they can be enabled with the <code>-A</code> option.</p>
</li>
<li>
<p>A new operator <code>//</code> (defined-or) will be available. This means that
one will be able to say</p>
<pre>
$a // $b</pre>
<p>instead of</p>
<pre>
defined $a ? $a : $b</pre>
<p>and</p>
<pre>
<span class="variable">$c</span> <span class="operator">/</span><span class="regex">/= $d;
</span>
</pre>
<p>instead of</p>
<pre>
<span class="variable">$c</span> <span class="operator">=</span> <span class="variable">$d</span> <span class="keyword">unless</span> <span class="keyword">defined</span> <span class="variable">$c</span><span class="operator">;</span>
</pre>
<p>The operator will have the same precedence and associativity as <code>||</code>.
A source code patch against the Perl 5.8.1 sources will be available
in CPAN as <em>authors/id/H/HM/HMBRAND/dor-5.8.1.diff</em>.</p>
</li>
<li>
<p><a href="../../lib/Pod/perlfunc.html#item_unpack"><code>unpack()</code></a> will default to unpacking the <a href="../../lib/Pod/perlvar.html#item___"><code>$_</code></a>.</p>
</li>
<li>
<p>Various Copy-On-Write techniques will be investigated in hopes
of speeding up Perl.</p>
</li>
<li>
<p>CPANPLUS, Inline, and Module::Build will become core modules.</p>
</li>
<li>
<p>The ability to write true lexically scoped pragmas will be introduced.</p>
</li>
<li>
<p>Work will continue on the bytecompiler and byteloader.</p>
</li>
<li>
<p>v-strings as they currently exist are scheduled to be deprecated. The
v-less form (1.2.3) will become a "version object" when used with <a href="../../lib/Pod/perlfunc.html#item_use"><code>use</code></a>,
<a href="../../lib/Pod/perlfunc.html#item_require"><code>require</code></a>, and <code>$VERSION</code>. $^V will also be a "version object" so the
<a href="../../lib/Pod/perlfunc.html#item_printf"><code>printf("%vd",...)</code></a> construct will no longer be needed. The v-ful version
(v1.2.3) will become obsolete. The equivalence of strings and v-strings (e.g.
that currently 5.8.0 is equal to "\5\8\0") will go away. <strong>There may be no
deprecation warning for v-strings</strong>, though: it is quite hard to detect when
v-strings are being used safely, and when they are not.</p>
</li>
<li>
<p>5.005 Threads Will Be Removed</p>
</li>
<li>
<p>The <a href="../../lib/Pod/perlvar.html#item___"><code>$*</code></a> Variable Will Be Removed
(it was deprecated a long time ago)</p>
</li>
<li>
<p>Pseudohashes Will Be Removed</p>
</li>
</ul>
<p>
</p>
<hr />
<h1><a name="reporting_bugs">Reporting Bugs</a></h1>
<p>If you find what you think is a bug, you might check the articles
recently posted to the comp.lang.perl.misc newsgroup and the perl
bug database at <a href="http://bugs.perl.org/">http://bugs.perl.org/</a> . There may also be
information at <a href="http://www.perl.com/">http://www.perl.com/</a> , the Perl Home Page.</p>
<p>If you believe you have an unreported bug, please run the <strong>perlbug</strong>
program included with your release. Be sure to trim your bug down
to a tiny but sufficient test case. Your bug report, along with the
output of <code>perl -V</code>, will be sent off to <a href="mailto:perlbug@perl.org">perlbug@perl.org</a> to be
analysed by the Perl porting team. You can browse and search
the Perl 5 bugs at <a href="http://bugs.perl.org/">http://bugs.perl.org/</a></p>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p>The <em>Changes</em> file for exhaustive details on what changed.</p>
<p>The <em>INSTALL</em> file for how to build Perl.</p>
<p>The <em>README</em> file for general stuff.</p>
<p>The <em>Artistic</em> and <em>Copying</em> files for copyright information.</p>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?