perl571delta.html
来自「perl教程」· HTML 代码 · 共 1,096 行 · 第 1/4 页
HTML
1,096 行
<?xml version="1.0" ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<!-- saved from url=(0017)http://localhost/ -->
<script language="JavaScript" src="../../displayToc.js"></script>
<script language="JavaScript" src="../../tocParas.js"></script>
<script language="JavaScript" src="../../tocTab.js"></script>
<link rel="stylesheet" type="text/css" href="../../scineplex.css">
<title>perl571delta - what's new for perl v5.7.1</title>
<link rel="stylesheet" href="../../Active.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:" />
</head>
<body>
<script>writelinks('__top__',2);</script>
<h1><a>perl571delta - what's new for perl v5.7.1</a></h1>
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<li><a href="#security_vulnerability_closed">Security Vulnerability Closed</a></li>
<li><a href="#incompatible_changes">Incompatible Changes</a></li>
<li><a href="#core_enhancements">Core Enhancements</a></li>
<ul>
<li><a href="#autoload_is_now_lvaluable">AUTOLOAD Is Now Lvaluable</a></li>
<li><a href="#perlio_is_now_the_default">PerlIO is Now The Default</a></li>
<li><a href="#signals_are_now_safe">Signals Are Now Safe</a></li>
</ul>
<li><a href="#modules_and_pragmata">Modules and Pragmata</a></li>
<ul>
<li><a href="#new_modules">New Modules</a></li>
<li><a href="#updated_and_improved_modules_and_pragmata">Updated And Improved Modules and Pragmata</a></li>
</ul>
<li><a href="#performance_enhancements">Performance Enhancements</a></li>
<li><a href="#utility_changes">Utility Changes</a></li>
<li><a href="#new_documentation">New Documentation</a></li>
<ul>
<li><a href="#perlclib">perlclib</a></li>
<li><a href="#perliol">perliol</a></li>
<li><a href="#readme_aix">README.aix</a></li>
<li><a href="#readme_bs2000">README.bs2000</a></li>
<li><a href="#readme_macos">README.macos</a></li>
<li><a href="#readme_mpeix">README.mpeix</a></li>
<li><a href="#readme_solaris">README.solaris</a></li>
<li><a href="#readme_vos">README.vos</a></li>
<li><a href="#porting_repository_pod">Porting/repository.pod</a></li>
</ul>
<li><a href="#installation_and_configuration_improvements">Installation and Configuration Improvements</a></li>
<ul>
<li><a href="#new_or_improved_platforms">New Or Improved Platforms</a></li>
<li><a href="#generic_improvements">Generic Improvements</a></li>
</ul>
<li><a href="#selected_bug_fixes">Selected Bug Fixes</a></li>
<ul>
<li><a href="#platform_specific_changes_and_fixes">Platform Specific Changes and Fixes</a></li>
</ul>
<li><a href="#new_or_changed_diagnostics">New or Changed Diagnostics</a></li>
<li><a href="#changed_internals">Changed Internals</a></li>
<li><a href="#new_tests">New Tests</a></li>
<li><a href="#known_problems">Known Problems</a></li>
<ul>
<li><a href="#aix_vac_5_0_0_0_may_produce_buggy_code_for_perl">AIX vac 5.0.0.0 May Produce Buggy Code For Perl</a></li>
<li><a href="#lib_ftmpsecurity_tests_warn__system_possibly_insecure_">lib/ftmp-security tests warn 'system possibly insecure'</a></li>
<li><a href="#lib_io_multihomed_fails_in_lp64configured_hpux">lib/io_multihomed Fails In LP64-Configured HP-UX</a></li>
<li><a href="#test_lib_posix_subtest_9_fails_in_lp64configured_hpux">Test lib/posix Subtest 9 Fails In LP64-Configured HP-UX</a></li>
<li><a href="#lib_b_test_19">lib/b test 19</a></li>
<li><a href="#linux_with_sfio_fails_op_misc_test_48">Linux With Sfio Fails op/misc Test 48</a></li>
<li><a href="#sigaction_test_13_in_vms">sigaction test 13 in VMS</a></li>
<li><a href="#sprintf_tests_129_and_130">sprintf tests 129 and 130</a></li>
<li><a href="#failure_of_thread_tests">Failure of Thread tests</a></li>
<li><a href="#localising_a_tied_variable_leaks_memory">Localising a Tied Variable Leaks Memory</a></li>
<li><a href="#selftying_of_arrays_and_hashes_is_forbidden">Self-tying of Arrays and Hashes Is Forbidden</a></li>
<li><a href="#building_extensions_can_fail_because_of_largefiles">Building Extensions Can Fail Because Of Largefiles</a></li>
<li><a href="#the_compiler_suite_is_still_experimental">The Compiler Suite Is Still Experimental</a></li>
</ul>
<li><a href="#reporting_bugs">Reporting Bugs</a></li>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#history">HISTORY</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>perl571delta - what's new for perl v5.7.1</p>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>This document describes differences between the 5.7.0 release and the
5.7.1 release.</p>
<p>(To view the differences between the 5.6.0 release and the 5.7.0
release, see <a href="../../lib/Pod/perl570delta.html">the perl570delta manpage</a>.)</p>
<p>
</p>
<hr />
<h1><a name="security_vulnerability_closed">Security Vulnerability Closed</a></h1>
<p>(This change was already made in 5.7.0 but bears repeating here.)</p>
<p>A potential security vulnerability in the optional suidperl component
of Perl was identified in August 2000. suidperl is neither built nor
installed by default. As of April 2001 the only known vulnerable
platform is Linux, most likely all Linux distributions. CERT and
various vendors and distributors have been alerted about the vulnerability.
See <a href="http://www.cpan.org/src/5.0/sperl-2000-08-05/sperl-2000-08-05.txt">http://www.cpan.org/src/5.0/sperl-2000-08-05/sperl-2000-08-05.txt</a>
for more information.</p>
<p>The problem was caused by Perl trying to report a suspected security
exploit attempt using an external program, /bin/mail. On Linux
platforms the /bin/mail program had an undocumented feature which
when combined with suidperl gave access to a root shell, resulting in
a serious compromise instead of reporting the exploit attempt. If you
don't have /bin/mail, or if you have 'safe setuid scripts', or if
suidperl is not installed, you are safe.</p>
<p>The exploit attempt reporting feature has been completely removed from
all the Perl 5.7 releases (and will be gone also from the maintenance
release 5.6.1), so that particular vulnerability isn't there anymore.
However, further security vulnerabilities are, unfortunately, always
possible. The suidperl code is being reviewed and if deemed too risky
to continue to be supported, it may be completely removed from future
releases. In any case, suidperl should only be used by security
experts who know exactly what they are doing and why they are using
suidperl instead of some other solution such as sudo
( see <a href="http://www.courtesan.com/sudo/">http://www.courtesan.com/sudo/</a> ).</p>
<p>
</p>
<hr />
<h1><a name="incompatible_changes">Incompatible Changes</a></h1>
<ul>
<li>
<p>Although "you shouldn't do that", it was possible to write code that
depends on Perl's hashed key order (Data::Dumper does this). The new
algorithm "One-at-a-Time" produces a different hashed key order.
More details are in <a href="#performance_enhancements">Performance Enhancements</a>.</p>
</li>
<li>
<p>The list of filenames from <a href="../../lib/Pod/perlfunc.html#item_glob"><code>glob()</code></a> (or <...>) is now by default sorted
alphabetically to be csh-compliant. (bsd_glob() does still sort platform
natively, ASCII or EBCDIC, unless GLOB_ALPHASORT is specified.)</p>
</li>
</ul>
<p>
</p>
<hr />
<h1><a name="core_enhancements">Core Enhancements</a></h1>
<p>
</p>
<h2><a name="autoload_is_now_lvaluable">AUTOLOAD Is Now Lvaluable</a></h2>
<p>AUTOLOAD is now lvaluable, meaning that you can add the :lvalue attribute
to AUTOLOAD subroutines and you can assign to the AUTOLOAD return value.</p>
<p>
</p>
<h2><a name="perlio_is_now_the_default">PerlIO is Now The Default</a></h2>
<ul>
<li>
<p>IO is now by default done via PerlIO rather than system's "stdio".
PerlIO allows "layers" to be "pushed" onto a file handle to alter the
handle's behaviour. Layers can be specified at open time via 3-arg
form of open:</p>
<pre>
open($fh,'>:crlf :utf8', $path) || ...</pre>
<p>or on already opened handles via extended <a href="../../lib/Pod/perlfunc.html#item_binmode"><code>binmode</code></a>:</p>
<pre>
<span class="keyword">binmode</span><span class="operator">(</span><span class="variable">$fh</span><span class="operator">,</span><span class="string">':encoding(iso-8859-7)'</span><span class="operator">);</span>
</pre>
<p>The built-in layers are: unix (low level read/write), stdio (as in
previous Perls), perlio (re-implementation of stdio buffering in a
portable manner), crlf (does CRLF <=> "\n" translation as on Win32,
but available on any platform). A mmap layer may be available if
platform supports it (mostly UNIXes).</p>
<p>Layers to be applied by default may be specified via the 'open' pragma.</p>
<p>See <a href="#installation_and_configuration_improvements">Installation and Configuration Improvements</a> for the effects
of PerlIO on your architecture name.</p>
</li>
<li>
<p>File handles can be marked as accepting Perl's internal encoding of Unicode
(UTF-8 or UTF-EBCDIC depending on platform) by a pseudo layer ":utf8" :</p>
<pre>
<span class="keyword">open</span><span class="operator">(</span><span class="variable">$fh</span><span class="operator">,</span><span class="string">">:utf8"</span><span class="operator">,</span><span class="string">"Uni.txt"</span><span class="operator">);</span>
</pre>
<p>Note for EBCDIC users: the pseudo layer ":utf8" is erroneously named
for you since it's not UTF-8 what you will be getting but instead
UTF-EBCDIC. See <a href="../../lib/Pod/perlunicode.html">the perlunicode manpage</a>, <a href="../../lib/utf8.html">the utf8 manpage</a>, and
<a href="http://www.unicode.org/unicode/reports/tr16/">http://www.unicode.org/unicode/reports/tr16/</a> for more information.
In future releases this naming may change.</p>
</li>
<li>
<p>File handles can translate character encodings from/to Perl's internal
Unicode form on read/write via the ":encoding()" layer.</p>
</li>
<li>
<p>File handles can be opened to "in memory" files held in Perl scalars via:</p>
<pre>
open($fh,'>', \$variable) || ...</pre>
</li>
<li>
<p>Anonymous temporary files are available without need to
'use FileHandle' or other module via</p>
<pre>
open($fh,"+>", undef) || ...</pre>
<p>That is a literal undef, not an undefined value.</p>
</li>
<li>
<p>The list form of <a href="../../lib/Pod/perlfunc.html#item_open"><code>open</code></a> is now implemented for pipes (at least on UNIX):</p>
<pre>
open($fh,"-|", 'cat', '/etc/motd')</pre>
<p>creates a pipe, and runs the equivalent of exec('cat', '/etc/motd') in
the child process.</p>
</li>
<li>
<p>The following builtin functions are now overridable: chop(), chomp(),
each(), keys(), pop(), push(), shift(), splice(), unshift().</p>
</li>
<li>
<p>Formats now support zero-padded decimal fields.</p>
</li>
<li>
<p>Perl now tries internally to use integer values in numeric conversions
and basic arithmetics (+ - * /) if the arguments are integers, and
tries also to keep the results stored internally as integers.
This change leads into often slightly faster and always less lossy
arithmetics. (Previously Perl always preferred floating point numbers
in its math.)</p>
</li>
<li>
<p>The <a href="../../lib/Pod/perlfunc.html#item_printf"><code>printf()</code></a> and <a href="../../lib/Pod/perlfunc.html#item_sprintf"><code>sprintf()</code></a> now support parameter reordering using the
<code>%\d+\$</code> and <code>*\d+\$</code> syntaxes. For example</p>
<pre>
<span class="keyword">print</span> <span class="string">"%2\$s %1\$s\n"</span><span class="operator">,</span> <span class="string">"foo"</span><span class="operator">,</span> <span class="string">"bar"</span><span class="operator">;</span>
</pre>
<p>will print "bar foo\n"; This feature helps in writing
internationalised software.</p>
</li>
<li>
<p>Unicode in general should be now much more usable. Unicode can be
used in hash keys, Unicode in regular expressions should work now,
Unicode in tr/// should work now (though tr/// seems to be a
particularly tricky to get right, so you have been warned)</p>
</li>
<li>
<p>The Unicode Character Database coming with Perl has been upgraded
to Unicode 3.1. For more information, see <a href="http://www.unicode.org/">http://www.unicode.org/</a> ,
and <a href="http://www.unicode.org/unicode/reports/tr27/">http://www.unicode.org/unicode/reports/tr27/</a></p>
<p>For developers interested in enhancing Perl's Unicode capabilities:
almost all the UCD files are included with the Perl distribution in
the lib/unicode subdirectory. The most notable omission, for space
considerations, is the Unihan database.</p>
</li>
<li>
<p>The Unicode character classes \p{Blank} and \p{SpacePerl} have been
added. "Blank" is like C isblank(), that is, it contains only
"horizontal whitespace" (the space character is, the newline isn't),
and the "SpacePerl" is the Unicode equivalent of <code>\s</code> (\p{Space}
isn't, since that includes the vertical tabulator character, whereas
<code>\s</code> doesn't.)</p>
</li>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?