📄 perl5005delta.1
字号:
value in exception traps. This makes it possible to propagateexception objects. This is an undocumented \fBexperimental\fR feature..Sh "Re-blessing in \s-1\fIDESTROY\s0()\fP supported for chaining \s-1\fIDESTROY\s0()\fP methods".IX Subsection "Re-blessing in DESTROY() supported for chaining DESTROY() methods"See \*(L"Destructors\*(R" in perlobj..ie n .Sh "All ""printf"" format conversions are handled internally".el .Sh "All \f(CWprintf\fP format conversions are handled internally".IX Subsection "All printf format conversions are handled internally"See \*(L"printf\*(R" in perlfunc..ie n .Sh "New ""INIT"" keyword".el .Sh "New \f(CWINIT\fP keyword".IX Subsection "New INIT keyword"\&\f(CW\*(C`INIT\*(C'\fR subs are like \f(CW\*(C`BEGIN\*(C'\fR and \f(CW\*(C`END\*(C'\fR, but they get run just beforethe perl runtime begins execution. e.g., the Perl Compiler makes use of\&\f(CW\*(C`INIT\*(C'\fR blocks to initialize and resolve pointers to XSUBs..ie n .Sh "New ""lock"" keyword".el .Sh "New \f(CWlock\fP keyword".IX Subsection "New lock keyword"The \f(CW\*(C`lock\*(C'\fR keyword is the fundamental synchronization primitivein threaded perl. When threads are not enabled, it is currently a noop..PPTo minimize impact on source compatibility this keyword is \*(L"weak\*(R", i.e., anyuser-defined subroutine of the same name overrides it, unless a \f(CW\*(C`use Thread\*(C'\fRhas been seen..ie n .Sh "New ""qr//"" operator".el .Sh "New \f(CWqr//\fP operator".IX Subsection "New qr// operator"The \f(CW\*(C`qr//\*(C'\fR operator, which is syntactically similar to the other quote-likeoperators, is used to create precompiled regular expressions. This compiledform can now be explicitly passed around in variables, and interpolated inother regular expressions. See perlop..ie n .Sh """our"" is now a reserved word".el .Sh "\f(CWour\fP is now a reserved word".IX Subsection "our is now a reserved word"Calling a subroutine with the name \f(CW\*(C`our\*(C'\fR will now provoke a warning whenusing the \f(CW\*(C`\-w\*(C'\fR switch..Sh "Tied arrays are now fully supported".IX Subsection "Tied arrays are now fully supported"See Tie::Array..Sh "Tied handles support is better".IX Subsection "Tied handles support is better"Several missing hooks have been added. There is also a new base class for\&\s-1TIEARRAY\s0 implementations. See Tie::Array..Sh "4th argument to substr".IX Subsection "4th argument to substr"\&\fIsubstr()\fR can now both return and replace in one operation. The optional4th argument is the replacement string. See \*(L"substr\*(R" in perlfunc..Sh "Negative \s-1LENGTH\s0 argument to splice".IX Subsection "Negative LENGTH argument to splice"\&\fIsplice()\fR with a negative \s-1LENGTH\s0 argument now work similar to what the\&\s-1LENGTH\s0 did for \fIsubstr()\fR. Previously a negative \s-1LENGTH\s0 was treated as0. See \*(L"splice\*(R" in perlfunc..Sh "Magic lvalues are now more magical".IX Subsection "Magic lvalues are now more magical"When you say something like \f(CW\*(C`substr($x, 5) = "hi"\*(C'\fR, the scalar returnedby \fIsubstr()\fR is special, in that any modifications to it affect \f(CW$x\fR.(This is called a 'magic lvalue' because an 'lvalue' is something onthe left side of an assignment.) Normally, this is exactly what youwould expect to happen, but Perl uses the same magic if you use \fIsubstr()\fR,\&\fIpos()\fR, or \fIvec()\fR in a context where they might be modified, like takinga reference with \f(CW\*(C`\e\*(C'\fR or as an argument to a sub that modifies \f(CW@_\fR.In previous versions, this 'magic' only went one way, but now changesto the scalar the magic refers to ($x in the above example) affect themagic lvalue too. For instance, this code now acts differently:.PP.Vb 6\& $x = "hello";\& sub printit {\& $x = "g\*(Aqbye";\& print $_[0], "\en";\& }\& printit(substr($x, 0, 5));.Ve.PPIn previous versions, this would print \*(L"hello\*(R", but it now prints \*(L"g'bye\*(R"..Sh "<> now reads in records".IX Subsection "<> now reads in records"If \f(CW$/\fR is a reference to an integer, or a scalar that holds an integer,<> will read in records instead of lines. For more info, see\&\*(L"$/\*(R" in perlvar..SH "Supported Platforms".IX Header "Supported Platforms"Configure has many incremental improvements. Site-wide policy for buildingperl can now be made persistent, via Policy.sh. Configure also recordsthe command-line arguments used in \fIconfig.sh\fR..Sh "New Platforms".IX Subsection "New Platforms"BeOS is now supported. See \fI\s-1README\s0.beos\fR..PP\&\s-1DOS\s0 is now supported under the \s-1DJGPP\s0 tools. See \fI\s-1README\s0.dos\fR (installed as perldos on some systems)..PPMiNT is now supported. See \fI\s-1README\s0.mint\fR..PPMPE/iX is now supported. See \fI\s-1README\s0.mpeix\fR..PP\&\s-1MVS\s0 (aka \s-1OS390\s0, aka Open Edition) is now supported. See \fI\s-1README\s0.os390\fR (installed as perlos390 on some systems)..PPStratus \s-1VOS\s0 is now supported. See \fI\s-1README\s0.vos\fR..Sh "Changes in existing support".IX Subsection "Changes in existing support"Win32 support has been vastly enhanced. Support for Perl Object, a \*(C+encapsulation of Perl. \s-1GCC\s0 and \s-1EGCS\s0 are now supported on Win32.See \fI\s-1README\s0.win32\fR, aka perlwin32..PP\&\s-1VMS\s0 configuration system has been rewritten. See \fI\s-1README\s0.vms\fR (installed as README_vms on some systems)..PPThe hints files for most Unix platforms have seen incremental improvements..SH "Modules and Pragmata".IX Header "Modules and Pragmata".Sh "New Modules".IX Subsection "New Modules".IP "B" 4.IX Item "B"Perl compiler and tools. See B..IP "Data::Dumper" 4.IX Item "Data::Dumper"A module to pretty print Perl data. See Data::Dumper..IP "Dumpvalue" 4.IX Item "Dumpvalue"A module to dump perl values to the screen. See Dumpvalue..IP "Errno" 4.IX Item "Errno"A module to look up errors more conveniently. See Errno..IP "File::Spec" 4.IX Item "File::Spec"A portable \s-1API\s0 for file operations..IP "ExtUtils::Installed" 4.IX Item "ExtUtils::Installed"Query and manage installed modules..IP "ExtUtils::Packlist" 4.IX Item "ExtUtils::Packlist"Manipulate .packlist files..IP "Fatal" 4.IX Item "Fatal"Make functions/builtins succeed or die..IP "IPC::SysV" 4.IX Item "IPC::SysV"Constants and other support infrastructure for System V \s-1IPC\s0 operationsin perl..IP "Test" 4.IX Item "Test"A framework for writing test suites..IP "Tie::Array" 4.IX Item "Tie::Array"Base class for tied arrays..IP "Tie::Handle" 4.IX Item "Tie::Handle"Base class for tied handles..IP "Thread" 4.IX Item "Thread"Perl thread creation, manipulation, and support..IP "attrs" 4.IX Item "attrs"Set subroutine attributes..IP "fields" 4.IX Item "fields"Compile-time class fields..IP "re" 4.IX Item "re"Various pragmata to control behavior of regular expressions..Sh "Changes in existing modules".IX Subsection "Changes in existing modules".IP "Benchmark" 4.IX Item "Benchmark"You can now run tests for \fIx\fR seconds instead of guessing the rightnumber of tests to run..SpKeeps better time..IP "Carp" 4.IX Item "Carp"Carp has a new function \fIcluck()\fR. \fIcluck()\fR warns, like \fIcarp()\fR, but also addsa stack backtrace to the error message, like \fIconfess()\fR..IP "\s-1CGI\s0" 4.IX Item "CGI"\&\s-1CGI\s0 has been updated to version 2.42..IP "Fcntl" 4.IX Item "Fcntl"More Fcntl constants added: F_SETLK64, F_SETLKW64, O_LARGEFILE forlarge (more than 4G) file access (the 64\-bit support is not yetworking, though, so no need to get overly excited), Free/Net/OpenBSDlocking behaviour flags F_FLOCK, F_POSIX, Linux F_SHLCK, andO_ACCMODE: the mask of O_RDONLY, O_WRONLY, and O_RDWR..IP "Math::Complex" 4.IX Item "Math::Complex"The accessors methods Re, Im, arg, abs, rho, theta, methods can($z\->\fIRe()\fR) now also act as mutators ($z\->\fIRe\fR\|(3))..IP "Math::Trig" 4.IX Item "Math::Trig"A little bit of radial trigonometry (cylindrical and spherical) added,for example the great circle distance..IP "\s-1POSIX\s0" 4.IX Item "POSIX"\&\s-1POSIX\s0 now has its own platform-specific hints files..IP "DB_File" 4.IX Item "DB_File"DB_File supports version 2.x of Berkeley \s-1DB\s0. See \f(CW\*(C`ext/DB_File/Changes\*(C'\fR..IP "MakeMaker" 4.IX Item "MakeMaker"MakeMaker now supports writing empty makefiles, provides a way tospecify that site \fIumask()\fR policy should be honored. There is alsobetter support for manipulation of .packlist files, and gettinginformation about installed modules..SpExtensions that have both architecture-dependent andarchitecture-independent files are now always installed completely inthe architecture-dependent locations. Previously, the shareable partswere shared both across architectures and across perl versions and weretherefore liable to be overwritten with newer versions that might havesubtle incompatibilities..IP "\s-1CPAN\s0" 4.IX Item "CPAN"See perlmodinstall and \s-1CPAN\s0..IP "Cwd" 4.IX Item "Cwd"Cwd::cwd is faster on most platforms..SH "Utility Changes".IX Header "Utility Changes"\&\f(CW\*(C`h2ph\*(C'\fR and related utilities have been vastly overhauled..PP\&\f(CW\*(C`perlcc\*(C'\fR, a new experimental front end for the compiler is available..PPThe crude \s-1GNU\s0 \f(CW\*(C`configure\*(C'\fR emulator is now called \f(CW\*(C`configure.gnu\*(C'\fR toavoid trampling on \f(CW\*(C`Configure\*(C'\fR under case-insensitive filesystems..PP\&\f(CW\*(C`perldoc\*(C'\fR used to be rather slow. The slower features are now optional.In particular, case-insensitive searches need the \f(CW\*(C`\-i\*(C'\fR switch, andrecursive searches need \f(CW\*(C`\-r\*(C'\fR. You can set these switches in the\&\f(CW\*(C`PERLDOC\*(C'\fR environment variable to get the old behavior..SH "Documentation Changes".IX Header "Documentation Changes"Config.pm now has a glossary of variables..PP\&\fIPorting/patching.pod\fR has detailed instructions on how to create andsubmit patches for perl..PPperlport specifies guidelines on how to write portably..PPperlmodinstall describes how to fetch and install modules from \f(CW\*(C`CPAN\*(C'\fRsites..PPSome more Perl traps are documented now. See perltrap..PPperlopentut gives a tutorial on using \fIopen()\fR..PPperlreftut gives a tutorial on references..PPperlthrtut gives a tutorial on threads..SH "New Diagnostics".IX Header "New Diagnostics".IP "Ambiguous call resolved as CORE::%s(), qualify as such or use &" 4.IX Item "Ambiguous call resolved as CORE::%s(), qualify as such or use &"(W) A subroutine you have declared has the same name as a Perl keyword,and you have used the name without qualification for calling one or the
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -