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

📄 perl593delta.pod

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 POD
📖 第 1 页 / 共 2 页
字号:
=head1 NAMEperl593delta - what is new for perl v5.9.3=head1 DESCRIPTIONThis document describes differences between the 5.9.2 and the 5.9.3development releases. See L<perl590delta>, L<perl591delta> andL<perl592delta> for the differences between 5.8.0 and 5.9.2.=head1 Incompatible Changes=head2 Parsing of C<-f _>The identifier C<_> is now forced to be a bareword after a filetestoperator. This solves a number of misparsing issues when a global C<_>subroutine is defined.=head2 C<mkdir()>C<mkdir()> without arguments now defaults to C<$_>.=head2 Magic goto and evalThe construct C<eval { goto &foo }> is now disallowed. (Note that thesimilar construct, but with C<eval("")> instead, was already forbidden.)=head2 C<$#> has been removedThe deprecated C<$#> variable (output format for numbers) has beenremoved. A new warning, C<$# is no longer supported>, has been added.=head2 C<:unique>The C<:unique> attribute has been made a no-op, since its currentimplementation was fundamentally flawed and not threadsafe.=head2 Scoping of the C<sort> pragmaThe C<sort> pragma is now lexically scoped. Its effect used to be global.=head1 Core Enhancements=head2 The C<feature> pragmaThe C<feature> pragma is used to enable new syntax that would break Perl'sbackwards-compatibility with older releases of the language. It's a lexicalpragma, like C<strict> or C<warnings>.Currently the following new features are available: C<switch> (adds aswitch statement), C<~~> (adds a Perl 6-like smart match operator), C<say>(adds a C<say> built-in function), and C<err> (adds an C<err> keyword).Those features are described below.Note that C<err> low-precedence defined-or operator used to be enabled bydefault (although as a weak keyword, meaning that any function wouldoverride it). It's now only recognized when explicitly turned on (and isthen a regular keyword).Those features, and the C<feature> pragma itself, have been contributed byRobin Houston.=head2 Switch and Smart Match operatorPerl 5 now has a switch statement. It's available when C<use feature'switch'> is in effect. This feature introduces three new keywords,C<given>, C<when>, and C<default>:    given ($foo) {	when (/^abc/) { $abc = 1; }	when (/^def/) { $def = 1; }	when (/^xyz/) { $xyz = 1; }	default { $nothing = 1; }    }A more complete description of how Perl matches the switch variableagainst the C<when> conditions is given in L<perlsyn/"Switch statements">.This kind of match is called I<smart match>, and it's also possible to useit outside of switch statements, via the new C<~~> operator (enabled viathe C<use feature '~~'> directive). See L<perlsyn/"Smart matching indetail">.=head2 C<say()>say() is a new built-in, only available when C<use feature 'say'> is ineffect, that is similar to print(), but that implicitly appends a newlineto the printed string. See L<perlfunc/say>.=head2 C<CLONE_SKIP()>Perl has now support for the C<CLONE_SKIP> special subroutine. LikeC<CLONE>, C<CLONE_SKIP> is called once per package; however, it is calledjust before cloning starts, and in the context of the parent thread. If itreturns a true value, then no objects of that class will be cloned. SeeL<perlmod> for details. (Contributed by Dave Mitchell.)=head2 C<${^CHILD_ERROR_NATIVE}>A new internal variable, C<${^CHILD_ERROR_NATIVE}>, gives the nativestatus returned by the last pipe close, backtick command, successful callto wait() or waitpid(), or from the system() operator. See L<perlrun> fordetails. (Contributed by Gisle Aas.)=head2 AssertionsThe support for assertions, introduced in perl 5.9.0, has been improved.The syntax for the C<-A> command-line switch has changed; it now acceptsan optional module name, defaulting to C<assertions::activate>. SeeL<assertions> and L<perlrun>. (Contributed by Salvador Fandi駉 Garc韆.)=head2 Unicode Character Database 4.1.0The copy of the Unicode Character Database included in Perl 5.9 hasbeen updated to 4.1.0.=head2 C<no VERSION>You can now use C<no> followed by a version number to specify that youwant to use a version of perl older than the specified one.=head2 Recursive sort subsYou can now use recursive subroutines with sort(), thanks to Robin Houston.=head2 Effect of pragmas in evalThe compile-time value of the C<%^H> hint variable can now propagate intoeval("")uated code. This makes it more useful to implement lexicalpragmas.As a side-effect of this, the overloaded-ness of constants now propagatesinto eval("").=head2 New B<-E> command-line switchB<-E> is equivalent to B<-e>, but it implicitly enables alloptional features (like C<use feature ":5.10">).=head2 C<chdir>, C<chmod> and C<chown> on filehandlesC<chdir>, C<chmod> and C<chown> can now work on filehandles as well asfilenames, if the system supports respectively C<fchdir>, C<fchmod> andC<fchown>, thanks to a patch provided by Gisle Aas.=head2 OS groupsC<$(> and C<$)> now return groups in the order where the OS returns them,thanks to Gisle Aas. This wasn't previously the case.=head1 Modules and Pragmata=head2 New Core Modules=over 4=item *A new pragma, C<feature>, has been added; see above in L</"CoreEnhancements">.=item *C<assertions::compat>, also available on CPAN, allows the use of assertions onperl versions prior to 5.9.0 (that is the first one to natively supportthem).=item *C<Math::BigInt::FastCalc> is an XS-enabled, and thus faster, version ofC<Math::BigInt::Calc>.=item *C<Compress::Zlib> is an interface to the zlib compression library. Itcomes with a bundled version of zlib, so having a working zlib is not aprerequisite to install it. It's used by C<Archive::Tar> (see below).=item *C<IO::Zlib> is an C<IO::>-style interface to C<Compress::Zlib>.=item *C<Archive::Tar> is a module to manipulate C<tar> archives.=item *C<Digest::SHA> is a module used to calculate many types of SHA digests,has been included for SHA support in the CPAN module.=item *C<ExtUtils::CBuilder> and C<ExtUtils::ParseXS> have been added.=back=head1 Utility Changes=head2 C<ptar>C<ptar> is a pure perl implementation of C<tar>, that comes withC<Archive::Tar>.=head2 C<ptardiff>C<ptardiff> is a small script used to generate a diff between the contentsof a tar archive and a directory tree. Like C<ptar>, it comes withC<Archive::Tar>.=head2 C<shasum>This command-line utility, used to print or to check SHA digests, comeswith the new C<Digest::SHA> module.=head2 C<h2xs> enhancementsC<h2xs> implements a new option C<--use-xsloader> to force use ofC<XSLoader> even in backwards compatible modules.The handling of authors' names that had apostrophes has been fixed.Any enums with negative values are now skipped.=head2 C<perlivp> enhancementsC<perlivp> no longer checks for F<*.ph> files by default.  Use the new C<-a>option to run I<all> tests.=head1 Documentation=head2 Perl GlossaryThe L<perlglossary> manpage is a glossary of terms used in the Perldocumentation, technical and otherwise, kindly provided by O'Reilly Media,Inc.L<perltodo> now lists a rough roadmap to Perl 5.10.=head1 Performance Enhancements=head2 XS-assisted SWASHGETSome pure-perl code that perl was using to retrieve Unicode properties andtransliteration mappings has been reimplemented in XS.=head2 Constant subroutinesThe interpreter internals now support a far more memory efficient form ofinlineable constants. Storing a reference to a constant value in a symboltable is equivalent to a full typeglob referencing a constant subroutine,but using about 400 bytes less memory. This proxy constant subroutine isautomatically upgraded to a real typeglob with subroutine if necessary.The approach taken is analogous to the existing space optimisation forsubroutine stub declarations, which are stored as plain scalars in placeof the full typeglob.Several of the core modules have been converted to use this feature fortheir system dependent constants - as a result C<use POSIX;> now takes about200K less memory.=head2 C<PERL_DONT_CREATE_GVSV>The new compilation flag C<PERL_DONT_CREATE_GVSV>, introduced as an optionin perl 5.8.8, is turned on by default in perl 5.9.3. It prevents perlfrom creating an empty scalar with every new typeglob. See L<perl588delta>for details.=head2 Weak references are cheaperWeak reference creation is now I<O(1)> rather than I<O(n)>, courtesy ofNicholas Clark. Weak reference deletion remains I<O(n)>, but if deletion onlyhappens at program exit, it may be skipped completely.=head2 sort() enhancements

⌨️ 快捷键说明

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