perl561delta.html

来自「perl教程」· HTML 代码 · 共 1,261 行 · 第 1/5 页

HTML
1,261 行
字号
<dt><strong><a name="item_numeric_conversions">Numeric conversions</a></strong>

<dd>
<p>Numeric conversions did not recognize changes in the string value
properly in certain circumstances.</p>
</dd>
<dd>
<p>In other situations, large unsigned numbers (those above 2**31) could
sometimes lose their unsignedness, causing bogus results in arithmetic
operations.</p>
</dd>
<dd>
<p>Integer modulus on large unsigned integers sometimes returned
incorrect values.</p>
</dd>
<dd>
<p>Perl 5.6.0 generated &quot;not a number&quot; warnings on certain conversions where
previous versions didn't.</p>
</dd>
<dd>
<p>These problems have all been rectified.</p>
</dd>
<dd>
<p>Infinity is now recognized as a number.</p>
</dd>
</li>
<dt><strong><a name="item_qw"><code>qw(a\\b)</code></a></strong>

<dd>
<p>In Perl 5.6.0, <a href="#item_qw"><code>qw(a\\b)</code></a> produced a string with two backslashes instead
of one, in a departure from the behavior in previous versions.  The
older behavior has been reinstated.</p>
</dd>
</li>
<dt><strong><a name="item_caller"><code>caller()</code></a></strong>

<dd>
<p><a href="#item_caller"><code>caller()</code></a> could cause core dumps in certain situations.  Carp was sometimes
affected by this problem.</p>
</dd>
</li>
<dt><strong><a name="item_bugs_in_regular_expressions">Bugs in regular expressions</a></strong>

<dd>
<p>Pattern matches on overloaded values are now handled correctly.</p>
</dd>
<dd>
<p>Perl 5.6.0 parsed m/\x{ab}/ incorrectly, leading to spurious warnings.
This has been corrected.</p>
</dd>
<dd>
<p>The RE engine found in Perl 5.6.0 accidentally pessimised certain kinds
of simple pattern matches.  These are now handled better.</p>
</dd>
<dd>
<p>Regular expression debug output (whether through <code>use re 'debug'</code>
or via <code>-Dr</code>) now looks better.</p>
</dd>
<dd>
<p>Multi-line matches like <code>&quot;a\nxb\n&quot; =~ /(?!\A)x/m</code> were flawed.  The
bug has been fixed.</p>
</dd>
<dd>
<p>Use of $&amp; could trigger a core dump under some situations.  This
is now avoided.</p>
</dd>
<dd>
<p>Match variables $1 et al., weren't being unset when a pattern match
was backtracking, and the anomaly showed up inside <code>/...(?{ ... }).../</code>
etc.  These variables are now tracked correctly.</p>
</dd>
<dd>
<p><a href="../../lib/Pod/perlfunc.html#item_pos"><code>pos()</code></a> did not return the correct value within s///ge in earlier
versions.  This is now handled correctly.</p>
</dd>
</li>
<dt><strong><a name="item__22slurp_22_mode">&quot;slurp&quot; mode</a></strong>

<dd>
<p><a href="../../lib/Pod/perlfunc.html#item_readline"><code>readline()</code></a> on files opened in &quot;slurp&quot; mode could return an extra &quot;&quot; at
the end in certain situations.  This has been corrected.</p>
</dd>
</li>
<dt><strong><a name="item_autovivification_of_symbolic_references_to_special">Autovivification of symbolic references to special variables</a></strong>

<dd>
<p>Autovivification of symbolic references of special variables described
in <a href="../../lib/Pod/perlvar.html">the perlvar manpage</a> (as in <code>${$num}</code>) was accidentally disabled.  This works
again now.</p>
</dd>
</li>
<dt><strong><a name="item_lexical_warnings">Lexical warnings</a></strong>

<dd>
<p>Lexical warnings now propagate correctly into <code>eval &quot;...&quot;</code>.</p>
</dd>
<dd>
<p><a href="#item_qw"><code>use warnings qw(FATAL all)</code></a> did not work as intended.  This has been
corrected.</p>
</dd>
<dd>
<p>Lexical warnings could leak into other scopes in some situations.
This is now fixed.</p>
</dd>
<dd>
<p>warnings::enabled() now reports the state of $^W correctly if the caller
isn't using lexical warnings.</p>
</dd>
</li>
<dt><strong><a name="item_spurious_warnings_and_errors">Spurious warnings and errors</a></strong>

<dd>
<p>Perl 5.6.0 could emit spurious warnings about redefinition of <code>dl_error()</code>
when statically building extensions into perl.  This has been corrected.</p>
</dd>
<dd>
<p>&quot;our&quot; variables could result in bogus &quot;Variable will not stay shared&quot;
warnings.  This is now fixed.</p>
</dd>
<dd>
<p>&quot;our&quot; variables of the same name declared in two sibling blocks
resulted in bogus warnings about &quot;redeclaration&quot; of the variables.
The problem has been corrected.</p>
</dd>
</li>
<dt><strong><a name="item_glob"><code>glob()</code></a></strong>

<dd>
<p>Compatibility of the builtin <a href="#item_glob"><code>glob()</code></a> with old csh-based glob has been
improved with the addition of GLOB_ALPHASORT option.  See <a href="#item_file_3a_3aglob"><code>File::Glob</code></a>.</p>
</dd>
<dd>
<p>File::Glob::glob() has been renamed to File::Glob::bsd_glob()
because the name clashes with the builtin glob().  The older
name is still available for compatibility, but is deprecated.</p>
</dd>
<dd>
<p>Spurious syntax errors generated in certain situations, when <a href="#item_glob"><code>glob()</code></a>
caused File::Glob to be loaded for the first time, have been fixed.</p>
</dd>
</li>
<dt><strong><a name="item_tainting">Tainting</a></strong>

<dd>
<p>Some cases of inconsistent taint propagation (such as within hash
values) have been fixed.</p>
</dd>
<dd>
<p>The tainting behavior of <a href="../../lib/Pod/perlfunc.html#item_sprintf"><code>sprintf()</code></a> has been rationalized.  It does
not taint the result of floating point formats anymore, making the
behavior consistent with that of string interpolation.</p>
</dd>
</li>
<dt><strong><a name="item_sort"><code>sort()</code></a></strong>

<dd>
<p>Arguments to <a href="#item_sort"><code>sort()</code></a> weren't being provided the right <a href="../../lib/Pod/perlfunc.html#item_wantarray"><code>wantarray()</code></a> context.
The comparison block is now run in scalar context, and the arguments to
be sorted are always provided list context.</p>
</dd>
<dd>
<p><a href="#item_sort"><code>sort()</code></a> is also fully reentrant, in the sense that the sort function
can itself call sort().  This did not work reliably in previous releases.</p>
</dd>
</li>
<dt><strong><a name="item__23line_directives">#line directives</a></strong>

<dd>
<p>#line directives now work correctly when they appear at the very
beginning of <code>eval &quot;...&quot;</code>.</p>
</dd>
</li>
<dt><strong><a name="item_subroutine_prototypes">Subroutine prototypes</a></strong>

<dd>
<p>The (\&amp;) prototype now works properly.</p>
</dd>
</li>
<dt><strong><a name="item_map"><code>map()</code></a></strong>

<dd>
<p><a href="#item_map"><code>map()</code></a> could get pathologically slow when the result list it generates
is larger than the source list.  The performance has been improved for
common scenarios.</p>
</dd>
</li>
<dt><strong><a name="item_debugger">Debugger</a></strong>

<dd>
<p>Debugger exit code now reflects the script exit code.</p>
</dd>
<dd>
<p>Condition <code>&quot;0&quot;</code> in breakpoints is now treated correctly.</p>
</dd>
<dd>
<p>The <a href="../../lib/Pod/perlguts.html#item_d"><code>d</code></a> command now checks the line number.</p>
</dd>
<dd>
<p><a href="../../lib/Pod/perlvar.html#item___"><code>$.</code></a> is no longer corrupted by the debugger.</p>
</dd>
<dd>
<p>All debugger output now correctly goes to the socket if RemotePort
is set.</p>
</dd>
</li>
<dt><strong><a name="item_perl5opt">PERL5OPT</a></strong>

<dd>
<p>PERL5OPT can be set to more than one switch group.  Previously,
it used to be limited to one group of options only.</p>
</dd>
</li>
<dt><strong><a name="item_chop"><code>chop()</code></a></strong>

<dd>
<p><a href="#item_chop"><code>chop(@list)</code></a> in list context returned the characters chopped in reverse
order.  This has been reversed to be in the right order.</p>
</dd>
</li>
<dt><strong><a name="item_unicode_support">Unicode support</a></strong>

<dd>
<p>Unicode support has seen a large number of incremental improvements,
but continues to be highly experimental.  It is not expected to be
fully supported in the 5.6.x maintenance releases.</p>
</dd>
<dd>
<p>substr(), join(), repeat(), reverse(), <a href="../../lib/Pod/perlfunc.html#item_quotemeta"><code>quotemeta()</code></a> and string
concatenation were all handling Unicode strings incorrectly in
Perl 5.6.0.  This has been corrected.</p>
</dd>
<dd>
<p>Support for <a href="../../lib/Pod/perlfunc.html#item_tr_"><code>tr///CU</code></a> and <a href="../../lib/Pod/perlfunc.html#item_tr_"><code>tr///UC</code></a> etc., have been removed since
we realized the interface is broken.  For similar functionality,
see <a href="../../lib/Pod/perlfunc.html#pack">pack in the perlfunc manpage</a>.</p>
</dd>
<dd>
<p>The Unicode Character Database has been updated to version 3.0.1
with additions made available to the public as of August 30, 2000.</p>
</dd>
<dd>
<p>The Unicode character classes \p{Blank} and \p{SpacePerl} have been
added.  &quot;Blank&quot; is like C isblank(), that is, it contains only
&quot;horizontal whitespace&quot; (the space character is, the newline isn't),
and the &quot;SpacePerl&quot; 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>
</dd>
<dd>
<p>If you are experimenting with Unicode support in perl, the development
versions of Perl may have more to offer.  In particular, I/O layers
are now available in the development track, but not in the maintenance
track, primarily to do backward compatibility issues.  Unicode support

⌨️ 快捷键说明

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