⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 perl5005delta.pod

📁 MSYS在windows下模拟了一个类unix的终端
💻 POD
📖 第 1 页 / 共 3 页
字号:
C<substr>, C<pos> and C<vec> don't leak memory anymore when used in lvaluecontext.  Many small leaks that impacted applications that embed multipleinterpreters have been fixed.=head2 Better support for multiple interpretersThe build-time option C<-DMULTIPLICITY> has had many of the detailsreworked.  Some previously global variables that should have beenper-interpreter now are.  With care, this allows interpreters to calleach other.  See the C<PerlInterp> extension on CPAN.=head2 Behavior of local() on array and hash elements is now well-definedSee L<perlsub/"Temporary Values via local()">.=head2 C<%!> is transparently tied to the L<Errno> moduleSee L<perlvar>, and L<Errno>.=head2 Pseudo-hashes are supportedSee L<perlref>.=head2 C<EXPR foreach EXPR> is supportedSee L<perlsyn>.=head2 Keywords can be globally overriddenSee L<perlsub>.=head2 C<$^E> is meaningful on Win32See L<perlvar>.=head2 C<foreach (1..1000000)> optimizedC<foreach (1..1000000)> is now optimized into a counting loop.  It doesnot try to allocate a 1000000-size list anymore.=head2 C<Foo::> can be used as implicitly quoted package nameBarewords caused unintuitive behavior when a subroutine with the samename as a package happened to be defined.  Thus, C<new Foo @args>,use the result of the call to C<Foo()> instead of C<Foo> being treatedas a literal.  The recommended way to write barewords in the indirectobject slot is C<new Foo:: @args>.  Note that the method C<new()> iscalled with a first argument of C<Foo>, not C<Foo::> when you do that.=head2 C<exists $Foo::{Bar::}> tests existence of a packageIt was impossible to test for the existence of a package withoutactually creating it before.  Now C<exists $Foo::{Bar::}> can beused to test if the C<Foo::Bar> namespace has been created.=head2 Better locale supportSee L<perllocale>.=head2 Experimental support for 64-bit platformsPerl5 has always had 64-bit support on systems with 64-bit longs.Starting with 5.005, the beginnings of experimental support for systemswith 32-bit long and 64-bit 'long long' integers has been added.If you add -DUSE_LONG_LONG to your ccflags in config.sh (or manuallydefine it in perl.h) then perl will be built with 'long long' support.There will be many compiler warnings, and the resultant perl may notwork on all systems.  There are many other issues related tothird-party extensions and libraries.  This option exists to allowpeople to work on those issues.=head2 prototype() returns useful results on builtinsSee L<perlfunc/prototype>.=head2 Extended support for exception handlingC<die()> now accepts a reference value, and C<$@> gets set to thatvalue in exception traps.  This makes it possible to propagateexception objects.  This is an undocumented B<experimental> feature.=head2 Re-blessing in DESTROY() supported for chaining DESTROY() methodsSee L<perlobj/Destructors>.=head2 All C<printf> format conversions are handled internallySee L<perlfunc/printf>.=head2 New C<INIT> keywordC<INIT> subs are like C<BEGIN> and C<END>, but they get run just beforethe perl runtime begins execution.  e.g., the Perl Compiler makes use ofC<INIT> blocks to initialize and resolve pointers to XSUBs.=head2 New C<lock> keywordThe C<lock> keyword is the fundamental synchronization primitivein threaded perl.  When threads are not enabled, it is currently a noop.To minimize impact on source compatibility this keyword is "weak", i.e., anyuser-defined subroutine of the same name overrides it, unless a C<use Thread>has been seen.=head2 New C<qr//> operatorThe C<qr//> 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 L<perlop>.=head2 C<our> is now a reserved wordCalling a subroutine with the name C<our> will now provoke a warning whenusing the C<-w> switch.=head2 Tied arrays are now fully supportedSee L<Tie::Array>.=head2 Tied handles support is betterSeveral missing hooks have been added.  There is also a new base class forTIEARRAY implementations.  See L<Tie::Array>.=head2 4th argument to substrsubstr() can now both return and replace in one operation.  The optional4th argument is the replacement string.  See L<perlfunc/substr>.=head2 Negative LENGTH argument to splicesplice() with a negative LENGTH argument now work similar to what theLENGTH did for substr().  Previously a negative LENGTH was treated as0.  See L<perlfunc/splice>.=head2 Magic lvalues are now more magicalWhen you say something like C<substr($x, 5) = "hi">, the scalar returnedby substr() is special, in that any modifications to it affect $x.(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 substr(),pos(), or vec() in a context where they might be modified, like takinga reference with C<\> or as an argument to a sub that modifies C<@_>.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:    $x = "hello";    sub printit {	$x = "g'bye";	print $_[0], "\n";    }    printit(substr($x, 0, 5));In previous versions, this would print "hello", but it now prints "g'bye".=head2 <> now reads in recordsIf C<$/> is a reference to an integer, or a scalar that holds an integer,<> will read in records instead of lines. For more info, seeL<perlvar/$/>.=head1 Supported PlatformsConfigure 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 F<config.sh>.=head2 New PlatformsBeOS is now supported.  See F<README.beos>.DOS is now supported under the DJGPP tools.  See F<README.dos> (installed as L<perldos> on some systems).MiNT is now supported.  See F<README.mint>.MPE/iX is now supported.  See F<README.mpeix>.MVS (aka OS390, aka Open Edition) is now supported.  See F<README.os390> (installed as L<perlos390> on some systems).Stratus VOS is now supported.  See F<README.vos>.=head2 Changes in existing supportWin32 support has been vastly enhanced.  Support for Perl Object, a C++encapsulation of Perl.  GCC and EGCS are now supported on Win32.See F<README.win32>, aka L<perlwin32>.VMS configuration system has been rewritten.  See F<README.vms> (installed as L<README_vms> on some systems).The hints files for most Unix platforms have seen incremental improvements.=head1 Modules and Pragmata=head2 New Modules=over 4=item BPerl compiler and tools.  See L<B>.=item Data::DumperA module to pretty print Perl data.  See L<Data::Dumper>.=item DumpvalueA module to dump perl values to the screen. See L<Dumpvalue>.=item ErrnoA module to look up errors more conveniently.  See L<Errno>.=item File::SpecA portable API for file operations.=item ExtUtils::InstalledQuery and manage installed modules.=item ExtUtils::PacklistManipulate .packlist files.=item FatalMake functions/builtins succeed or die.=item IPC::SysVConstants and other support infrastructure for System V IPC operationsin perl.=item TestA framework for writing testsuites.=item Tie::ArrayBase class for tied arrays.=item Tie::HandleBase class for tied handles.=item ThreadPerl thread creation, manipulation, and support.=item attrsSet subroutine attributes.=item fieldsCompile-time class fields.=item reVarious pragmata to control behavior of regular expressions.=back=head2 Changes in existing modules=over 4=item BenchmarkYou can now run tests for I<x> seconds instead of guessing the rightnumber of tests to run.Keeps better time.=item CarpCarp has a new function cluck(). cluck() warns, like carp(), but also addsa stack backtrace to the error message, like confess().=item CGICGI has been updated to version 2.42.=item FcntlMore 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.=item Math::ComplexThe accessors methods Re, Im, arg, abs, rho, theta, methods can($z->Re()) now also act as mutators ($z->Re(3)).=item Math::TrigA little bit of radial trigonometry (cylindrical and spherical) added,for example the great circle distance.=item POSIXPOSIX now has its own platform-specific hints files.=item DB_FileDB_File supports version 2.x of Berkeley DB.  See C<ext/DB_File/Changes>.=item MakeMakerMakeMaker now supports writing empty makefiles, provides a way tospecify that site umask() policy should be honored.  There is alsobetter support for manipulation of .packlist files, and gettinginformation about installed modules.Extensions 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.=item CPAN

⌨️ 快捷键说明

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