perldelta.pod

来自「MSYS在windows下模拟了一个类unix的终端」· POD 代码 · 共 1,910 行 · 第 1/5 页

POD
1,910
字号
=head1 NAMEperldelta - what's new for perl v5.6.x=head1 DESCRIPTIONThis document describes differences between the 5.005 release and the 5.6.1release.=head1 Summary of changes between 5.6.0 and 5.6.1This section contains a summary of the changes between the 5.6.0 releaseand the 5.6.1 release.  More details about the changes mentioned heremay be found in the F<Changes> files that accompany the Perl sourcedistribution.  See L<perlhack> for pointers to online resources where youcan inspect the individual patches described by these changes.=head2 Security Issuessuidperl will not run /bin/mail anymore, because some platforms havea /bin/mail that is vulnerable to buffer overflow attacks.Note that suidperl is neither built nor installed by default inany recent version of perl.  Use of suidperl is highly discouraged.If you think you need it, try alternatives such as sudo first.See http://www.courtesan.com/sudo/.=head2 Core bug fixesThis is not an exhaustive list.  It is intended to cover only thesignificant user-visible changes.=over=item C<UNIVERSAL::isa()>A bug in the caching mechanism used by C<UNIVERSAL::isa()> that affectedbase.pm has been fixed.  The bug has existed since the 5.005 releases,but wasn't tickled by base.pm in those releases.=item Memory leaksVarious cases of memory leaks and attempts to access uninitialized memoryhave been cured.  See L</"Known Problems"> below for further issues.=item Numeric conversionsNumeric conversions did not recognize changes in the string valueproperly in certain circumstances.In other situations, large unsigned numbers (those above 2**31) couldsometimes lose their unsignedness, causing bogus results in arithmeticoperations.Integer modulus on large unsigned integers sometimes returnedincorrect values.Perl 5.6.0 generated "not a number" warnings on certain conversions whereprevious versions didn't.These problems have all been rectified.Infinity is now recognized as a number.=item qw(a\\b)In Perl 5.6.0, qw(a\\b) produced a string with two backslashes insteadof one, in a departure from the behavior in previous versions.  Theolder behavior has been reinstated.  =item caller()caller() could cause core dumps in certain situations.  Carp was sometimesaffected by this problem.=item Bugs in regular expressionsPattern matches on overloaded values are now handled correctly.Perl 5.6.0 parsed m/\x{ab}/ incorrectly, leading to spurious warnings.This has been corrected.The RE engine found in Perl 5.6.0 accidentally pessimised certain kindsof simple pattern matches.  These are now handled better.Regular expression debug output (whether through C<use re 'debug'>or via C<-Dr>) now looks better.Multi-line matches like C<"a\nxb\n" =~ /(?!\A)x/m> were flawed.  Thebug has been fixed.Use of $& could trigger a core dump under some situations.  Thisis now avoided.Match variables $1 et al., weren't being unset when a pattern matchwas backtracking, and the anomaly showed up inside C</...(?{ ... }).../>etc.  These variables are now tracked correctly.pos() did not return the correct value within s///ge in earlierversions.  This is now handled correctly.=item "slurp" modereadline() on files opened in "slurp" mode could return an extra "" atthe end in certain situations.  This has been corrected.=item Autovivification of symbolic references to special variablesAutovivification of symbolic references of special variables describedin L<perlvar> (as in C<${$num}>) was accidentally disabled.  This worksagain now.=item Lexical warnings Lexical warnings now propagate correctly into C<eval "...">.C<use warnings qw(FATAL all)> did not work as intended.  This has beencorrected.Lexical warnings could leak into other scopes in some situations.This is now fixed.warnings::enabled() now reports the state of $^W correctly if the callerisn't using lexical warnings.=item Spurious warnings and errorsPerl 5.6.0 could emit spurious warnings about redefinition of dl_error()when statically building extensions into perl.  This has been corrected."our" variables could result in bogus "Variable will not stay shared"warnings.  This is now fixed."our" variables of the same name declared in two sibling blocksresulted in bogus warnings about "redeclaration" of the variables.The problem has been corrected.=item glob()Compatibility of the builtin glob() with old csh-based glob has beenimproved with the addition of GLOB_ALPHASORT option.  See C<File::Glob>.File::Glob::glob() has been renamed to File::Glob::bsd_glob()because the name clashes with the builtin glob().  The oldername is still available for compatibility, but is deprecated.Spurious syntax errors generated in certain situations, when glob()caused File::Glob to be loaded for the first time, have been fixed.=item TaintingSome cases of inconsistent taint propagation (such as within hashvalues) have been fixed.The tainting behavior of sprintf() has been rationalized.  It doesnot taint the result of floating point formats anymore, making thebehavior consistent with that of string interpolation.=item sort()Arguments to sort() weren't being provided the right wantarray() context.The comparison block is now run in scalar context, and the arguments tobe sorted are always provided list context.sort() is also fully reentrant, in the sense that the sort functioncan itself call sort().  This did not work reliably in previous releases.=item #line directives#line directives now work correctly when they appear at the verybeginning of C<eval "...">.=item Subroutine prototypesThe (\&) prototype now works properly.=item map()map() could get pathologically slow when the result list it generatesis larger than the source list.  The performance has been improved forcommon scenarios.=item DebuggerDebugger exit code now reflects the script exit code.Condition C<"0"> in breakpoints is now treated correctly.The C<d> command now checks the line number.C<$.> is no longer corrupted by the debugger.All debugger output now correctly goes to the socket if RemotePortis set.=item PERL5OPTPERL5OPT can be set to more than one switch group.  Previously,it used to be limited to one group of options only.=item chop()chop(@list) in list context returned the characters chopped in reverseorder.  This has been reversed to be in the right order.=item Unicode supportUnicode support has seen a large number of incremental improvements,but continues to be highly experimental.  It is not expected to befully supported in the 5.6.x maintenance releases.substr(), join(), repeat(), reverse(), quotemeta() and stringconcatenation were all handling Unicode strings incorrectly inPerl 5.6.0.  This has been corrected.Support for C<tr///CU> and C<tr///UC> etc., have been removed sincewe realized the interface is broken.  For similar functionality,see L<perlfunc/pack>.The Unicode Character Database has been updated to version 3.0.1with additions made available to the public as of August 30, 2000.The Unicode character classes \p{Blank} and \p{SpacePerl} have beenadded.  "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 C<\s> (\p{Space}isn't, since that includes the vertical tabulator character, whereasC<\s> doesn't.)If you are experimenting with Unicode support in perl, the developmentversions of Perl may have more to offer.  In particular, I/O layersare now available in the development track, but not in the maintenancetrack, primarily to do backward compatibility issues.  Unicode supportis also evolving rapidly on a daily basis in the development track--themaintenance track only reflects the most conservative of these changes.=item 64-bit supportSupport for 64-bit platforms has been improved, but continues to beexperimental.  The level of support varies greatly among platforms.=item CompilerThe B Compiler and its various backends have had many incrementalimprovements, but they continue to remain highly experimental.  Use inproduction environments is discouraged.The perlcc tool has been rewritten so that the user interface is muchmore like that of a C compiler.The perlbc tools has been removed.  Use C<perlcc -B> instead.=item Lvalue subroutinesThere have been various bugfixes to support lvalue subroutines better.However, the feature still remains experimental.=item IO::SocketIO::Socket::INET failed to open the specified port if the servicename was not known.  It now correctly uses the supplied port numberas is.=item File::FindFile::Find now chdir()s correctly when chasing symbolic links.=item xsubppxsubpp now tolerates embedded POD sections.=item C<no Module;>C<no Module;> does not produce an error even if Module does not have anunimport() method.  This parallels the behavior of C<use> vis-a-visC<import>.=item TestsA large number of tests have been added.=back=head2 Core featuresuntie() will now call an UNTIE() hook if it exists.  See L<perltie>for details.The C<-DT> command line switch outputs copious tokenizing information.See L<perlrun>.Arrays are now always interpolated in double-quotish strings.  Previously,C<"foo@bar.com"> used to be a fatal error at compile time, if an arrayC<@bar> was not used or declared.  This transitional behavior wasintended to help migrate perl4 code, and is deemed to be no longer useful.See L</"Arrays now always interpolate into double-quoted strings">.keys(), each(), pop(), push(), shift(), splice() and unshift()can all be overridden now.C<my __PACKAGE__ $obj> now does the expected thing.=head2 Configuration issuesOn some systems (IRIX and Solaris among them) the system malloc is demonstrablybetter.  While the defaults haven't been changed in order to retain binarycompatibility with earlier releases, you may be better off building perlwith C<Configure -Uusemymalloc ...> as discussed in the F<INSTALL> file.C<Configure> has been enhanced in various ways:=over=item *Minimizes use of temporary files.=item *By default, does not link perl with libraries not used by it, such asthe various dbm libraries.  SunOS 4.x hints preserve behavior on thatplatform.=item *Support for pdp11-style memory models has been removed due to obsolescence.=item *Building outside the source tree is supported on systems that havesymbolic links. This is done by running    sh /path/to/source/Configure -Dmksymlinks ...    make all test installin a directory other than the perl source directory.  See F<INSTALL>.=item *C<Configure -S> can be run non-interactively.=back=head2 DocumentationREADME.aix, README.solaris and README.macos have been added.  README.posix-bchas been renamed to README.bs2000.  These are installed as L<perlaix>,L<perlsolaris>, L<perlmacos>, and L<perlbs2000> respectively.The following pod documents are brand new:    perlclib	Internal replacements for standard C library functions    perldebtut	Perl debugging tutorial    perlebcdic	Considerations for running Perl on EBCDIC platforms    perlnewmod	Perl modules: preparing a new module for distribution    perlrequick	Perl regular expressions quick start    perlretut	Perl regular expressions tutorial    perlutil	utilities packaged with the Perl distributionThe F<INSTALL> file has been expanded to cover various issues, such as64-bit support.A longer list of contributors has been added to the source distribution.See the file C<AUTHORS>.Numerous other changes have been made to the included documentation and FAQs.=head2 Bundled modulesThe following modules have been added.=over=item B::ConciseWalks Perl syntax tree, printing concise info about ops.  See L<B::Concise>.=item File::TempReturns name and handle of a temporary file safely.  See L<File::Temp>.=item Pod::LaTeX

⌨️ 快捷键说明

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