📄 perl572delta.1
字号:
Lexicals I: lexicals outside an eval "\*(L" weren't resolvedcorrectly inside a subroutine definition inside the eval \*(R"\*(L" if theywere not already referenced in the top level of the eval\*(R""ed code..IP "\(bu" 4Lexicals \s-1II:\s0 lexicals leaked at file scope into subroutines thatwere declared before the lexicals..IP "\(bu" 4Lvalue subroutines can now return \f(CW\*(C`undef\*(C'\fR in list context..IP "\(bu" 4The \f(CW\*(C`op_clear\*(C'\fR and \f(CW\*(C`op_null\*(C'\fR are now exported..IP "\(bu" 4A new special regular expression variable has been introduced:\&\f(CW$^N\fR, which contains the most-recently closed group (submatch)..IP "\(bu" 4utime now supports \f(CW\*(C`utime undef, undef, @files\*(C'\fR to change thefile timestamps to the current time..IP "\(bu" 4The Perl parser has been stress tested using both random input andMarkov chain input..IP "\(bu" 4\&\f(CW\*(C`eval "v200"\*(C'\fR now works..IP "\(bu" 4\&\s-1VMS\s0 now works under PerlIO..IP "\(bu" 4\&\s-1END\s0 blocks are now run even if you exit/die in a \s-1BEGIN\s0 block.The execution of \s-1END\s0 blocks is now controlled by PL_exit_flags & \s-1PERL_EXIT_DESTRUCT_END\s0. This enables the newbehaviour for perl embedders. This will default in 5.10. Seeperlembed..SH "Modules and Pragmata".IX Header "Modules and Pragmata".Sh "New Modules and Distributions".IX Subsection "New Modules and Distributions".IP "\(bu" 4Attribute::Handlers \- Simpler definition of attribute handlers.IP "\(bu" 4ExtUtils::Constant \- generate \s-1XS\s0 code to import C header constants.IP "\(bu" 4I18N::Langinfo \- query locale information.IP "\(bu" 4I18N::LangTags \- functions for dealing with RFC3066\-style language tags.IP "\(bu" 4libnet \- a collection of perl5 modules related to network programming.SpPerl installation leaves libnet unconfigured, use \fIlibnetcfg\fR to configure..IP "\(bu" 4List::Util \- selection of general-utility list subroutines.IP "\(bu" 4Locale::Maketext \- framework for localization.IP "\(bu" 4Memoize \- Make your functions faster by trading space for time.IP "\(bu" 4\&\s-1NEXT\s0 \- pseudo-class for method redispatch.IP "\(bu" 4Scalar::Util \- selection of general-utility scalar subroutines.IP "\(bu" 4Test::More \- yet another framework for writing test scripts.IP "\(bu" 4Test::Simple \- Basic utilities for writing tests.IP "\(bu" 4Time::HiRes \- high resolution ualarm, usleep, and gettimeofday.IP "\(bu" 4Time::Piece \- Object Oriented time objects.Sp(Previously known as Time::Object.).IP "\(bu" 4Time::Seconds \- a simple \s-1API\s0 to convert seconds to other date values.IP "\(bu" 4UnicodeCD \- Unicode Character Database.Sh "Updated And Improved Modules and Pragmata".IX Subsection "Updated And Improved Modules and Pragmata".IP "\(bu" 4B::Deparse module has been significantly enhanced. It nowcan deparse almost all of the standard test suite (so that thetests still succeed). There is a make target \*(L"test.deparse\*(R"for trying this out..IP "\(bu" 4Class::Struct now assigns the array/hash element if the accessoris called with an array/hash element as the \fBsole\fR argument..IP "\(bu" 4Cwd extension is now (even) faster..IP "\(bu" 4DB_File extension has been updated to version 1.77..IP "\(bu" 4Fcntl, Socket, and Sys::Syslog have been rewritten to use thenew-style constant dispatch section (see ExtUtils::Constant)..IP "\(bu" 4File::Find is now (again) reentrant. It also has been mademore portable..IP "\(bu" 4File::Glob now supports \f(CW\*(C`GLOB_LIMIT\*(C'\fR constant to limit thesize of the returned list of filenames..IP "\(bu" 4IO::Socket::INET now supports \f(CW\*(C`LocalPort\*(C'\fR of zero (usually meaningthat the operating system will make one up.).IP "\(bu" 4The vars pragma now supports declaring fully qualified variables.(Something that \f(CW\*(C`our()\*(C'\fR does not and will not support.).SH "Utility Changes".IX Header "Utility Changes".IP "\(bu" 4The \fIemacs/e2ctags.pl\fR is now much faster..IP "\(bu" 4h2ph now supports C trigraphs..IP "\(bu" 4h2xs uses the new ExtUtils::Constant module which will affectnewly created extensions that define constants. Since the new code ismore correct (if you have two constants where the first one is aprefix of the second one, the first constant \fBnever\fR gets defined),less lossy (it uses integers for integer constant, as opposed to theold code that used floating point numbers even for integer constants),and slightly faster, you might want to consider regenerating yourextension code (the new scheme makes regenerating easy).h2xs now also supports C trigraphs..IP "\(bu" 4libnetcfg has been added to configure the libnet..IP "\(bu" 4The \fIPod::Html\fR (and thusly pod2html) now allows specifyinga cache directory..SH "New Documentation".IX Header "New Documentation".IP "\(bu" 4Locale::Maketext::TPJ13 is an article about software localization,originally published in The Perl Journal #13, republished here withkind permission..IP "\(bu" 4More \s-1README\s0.$PLATFORM files have been converted into pod, which alsomeans that they also be installed as perl$PLATFORM documentationfiles. The new files are perlapollo, perlbeos, perldgux,perlhurd, perlmint, perlnetware, perlplan9, perlqnx,and perltru64..IP "\(bu" 4The \fITodo\fR and \fITodo\-5.6\fR files have been merged into perltodo..IP "\(bu" 4Use of the \fIgprof\fR tool to profile Perl has been documented inperlhack. There is a make target \*(L"perl.gprof\*(R" for generating agprofiled Perl executable..SH "Installation and Configuration Improvements".IX Header "Installation and Configuration Improvements".Sh "New Or Improved Platforms".IX Subsection "New Or Improved Platforms".IP "\(bu" 4\&\s-1AIX\s0 should now work better with gcc, threads, and 64\-bitness. Also thelong doubles support in \s-1AIX\s0 should be better now. See perlaix..IP "\(bu" 4AtheOS ( http://www.atheos.cx/ ) is a new platform..IP "\(bu" 4\&\s-1DG/UX\s0 platform now supports the 5.005\-style threads. See perldgux..IP "\(bu" 4DYNIX/ptx platform (a.k.a. dynixptx) is supported at or near osvers 4.5.2..IP "\(bu" 4Several Mac \s-1OS\s0 (Classic) portability patches have been applied. Wehope to get a fully working port by 5.8.0. (The remaining problemsrelate to the changed \s-1IO\s0 model of Perl.) See perlmacos..IP "\(bu" 4Mac \s-1OS\s0 X (or Darwin) should now be able to build Perl even on \s-1HFS+\s0filesystems. (The case-insensitivity confused the Perl build process.).IP "\(bu" 4NetWare from Novell is now supported. See perlnetware..IP "\(bu" 4The Amdahl \s-1UTS\s0 \s-1UNIX\s0 mainframe platform is now supported..Sh "Generic Improvements".IX Subsection "Generic Improvements".IP "\(bu" 4In \s-1AFS\s0 installations one can configure the root of the \s-1AFS\s0 to besomewhere else than the default \fI/afs\fR by using the Configureparameter \f(CW\*(C`\-Dafsroot=/some/where/else\*(C'\fR..IP "\(bu" 4The version of Berkeley \s-1DB\s0 used when the Perl (and, presumably, theDB_File extension) was built is now available as\&\f(CW@Config{qw(db_version_major db_version_minor db_version_patch)}\fRfrom Perl and as \f(CW\*(C`DB_VERSION_MAJOR_CFG DB_VERSION_MINOR_CFGDB_VERSION_PATCH_CFG\*(C'\fR from C..IP "\(bu" 4The Thread extension is now not built at all under ithreads(\f(CW\*(C`Configure \-Duseithreads\*(C'\fR) because it wouldn't work anyway (theThread extension requires being Configured with \f(CW\*(C`\-Duse5005threads\*(C'\fR)..IP "\(bu" 4The \f(CW\*(C`B::Deparse\*(C'\fR compiler backend has been so significantly improvedthat almost the whole Perl test suite passes after being deparsed. Amake target has been added to help in further testing: \f(CW\*(C`make test.deparse\*(C'\fR..SH "Selected Bug Fixes".IX Header "Selected Bug Fixes".IP "\(bu" 5The autouse pragma didn't work for Multi::Part::Function::Names..IP "\(bu" 5The behaviour of non-decimal but numeric string constants such as\&\*(L"0x23\*(R" was platform-dependent: in some platforms that was seen as 35,in some as 0, in some as a floating point number (don't ask). Thiswas caused by Perl using the operating system libraries in a situationwhere the result of the string to number conversion is undefined: nowPerl consistently handles such strings as zero in numeric contexts..IP "\(bu" 5dprofpp \-R didn't work..IP "\(bu" 5\&\s-1PERL5OPT\s0 with embedded spaces didn't work..IP "\(bu" 5Sys::Syslog ignored the \f(CW\*(C`LOG_AUTH\*(C'\fR constant..Sh "Platform Specific Changes and Fixes".IX Subsection "Platform Specific Changes and Fixes".IP "\(bu" 4Some versions of glibc have a broken \fImodfl()\fR. This affects buildswith \f(CW\*(C`\-Duselongdouble\*(C'\fR. This version of Perl detects this brokennessand has a workaround for it. The glibc release 2.2.2 is known to havefixed the \fImodfl()\fR bug..SH "New or Changed Diagnostics".IX Header "New or Changed Diagnostics".IP "\(bu" 4In the regular expression diagnostics the \f(CW\*(C`<< HERE\*(C'\fR markerintroduced in 5.7.0 has been changed to be \f(CW\*(C`<\-\- HERE\*(C'\fR since toomany people found the \f(CW\*(C`<<\*(C'\fR to be too similar to here-documentstarters..IP "\(bu" 4If you try to \*(L"pack\*(R" in perlfunc a number less than 0 or larger than 255using the \f(CW"C"\fR format you will get an optional warning. Similarlyfor the \f(CW"c"\fR format and a number less than \-128 or more than 127..IP "\(bu" 4Certain regex modifiers such as \f(CW\*(C`(?o)\*(C'\fR make sense only if applied tothe entire regex. You will an optional warning if you try to do otherwise..IP "\(bu" 4Using arrays or hashes as references (e.g. \f(CW\*(C`%foo\->{bar}\*(C'\fR has beendeprecated for a while. Now you will get an optional warning..SH "Source Code Enhancements".IX Header "Source Code Enhancements".Sh "\s-1MAGIC\s0 constants".IX Subsection "MAGIC constants"The \s-1MAGIC\s0 constants (e.g. \f(CW\*(AqP\*(Aq\fR) have been macrofied(e.g. \f(CW\*(C`PERL_MAGIC_TIED\*(C'\fR) for better source code readabilityand maintainability..Sh "Better commented code".IX Subsection "Better commented code"\&\fIperly.c\fR, \fIsv.c\fR, and \fIsv.h\fR have now been extensively commented..Sh "Regex pre\-/post\-compilation items matched up".IX Subsection "Regex pre-/post-compilation items matched up"The regex compiler now maintains a structure that identifies nodes inthe compiled bytecode with the corresponding syntactic features of theoriginal regex expression. The information is attached to the new\&\f(CW\*(C`offsets\*(C'\fR member of the \f(CW\*(C`struct regexp\*(C'\fR. See perldebguts for morecomplete information..Sh "gcc \-Wall".IX Subsection "gcc -Wall"The C code has been made much more \f(CW\*(C`gcc \-Wall\*(C'\fR clean. Some warningmessages still remain, though, so if you are compiling with gcc youwill see some warnings about dubious practices. The warnings arebeing worked on..SH "New Tests".IX Header "New Tests"Several new tests have been added, especially for the \fIlib\fR subsection..PPThe tests are now reported in a different order than in earlier Perls.(This happens because the test scripts from under t/lib have been moved
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -