📄 perl58delta.1
字号:
and directories in an easy, portable, and secure way. See File::Temp.[561+].IP "\(bu" 4\&\f(CW\*(C`Filter::Util::Call\*(C'\fR, by Paul Marquess, provides you with theframework to write \fIsource filters\fR in Perl. For most uses, thefrontend Filter::Simple is to be preferred. See Filter::Util::Call..IP "\(bu" 4\&\f(CW\*(C`if\*(C'\fR, by Ilya Zakharevich, is a new pragma for conditional inclusionof modules..IP "\(bu" 4libnet, by Graham Barr, is a collection of perl5 modules relatedto network programming. See Net::FTP, Net::NNTP, Net::Ping(not part of libnet, but related), Net::POP3, Net::SMTP,and Net::Time..SpPerl installation leaves libnet unconfigured; use \fIlibnetcfg\fRto configure it..IP "\(bu" 4\&\f(CW\*(C`List::Util\*(C'\fR, by Graham Barr, is a selection of general-utilitylist subroutines, such as \fIsum()\fR, \fImin()\fR, \fIfirst()\fR, and \fIshuffle()\fR.See List::Util..IP "\(bu" 4\&\f(CW\*(C`Locale::Constants\*(C'\fR, \f(CW\*(C`Locale::Country\*(C'\fR, \f(CW\*(C`Locale::Currency\*(C'\fR\&\f(CW\*(C`Locale::Language\*(C'\fR, and Locale::Script, by Neil Bowers, havebeen added. They provide the codes for various locale standards, suchas \*(L"fr\*(R" for France, \*(L"usd\*(R" for \s-1US\s0 Dollar, and \*(L"ja\*(R" for Japanese..Sp.Vb 1\& use Locale::Country;\&\& $country = code2country(\*(Aqjp\*(Aq); # $country gets \*(AqJapan\*(Aq\& $code = country2code(\*(AqNorway\*(Aq); # $code gets \*(Aqno\*(Aq.Ve.SpSee Locale::Constants, Locale::Country, Locale::Currency,and Locale::Language..IP "\(bu" 4\&\f(CW\*(C`Locale::Maketext\*(C'\fR, by Sean Burke, is a localization framework. SeeLocale::Maketext, and Locale::Maketext::TPJ13. The latter is anarticle about software localization, originally published in The PerlJournal #13, and republished here with kind permission..IP "\(bu" 4\&\f(CW\*(C`Math::BigRat\*(C'\fR for big rational numbers, to accompany Math::BigInt andMath::BigFloat, from Tels. See Math::BigRat..IP "\(bu" 4\&\f(CW\*(C`Memoize\*(C'\fR can make your functions faster by trading space for time,from Mark-Jason Dominus. See Memoize..IP "\(bu" 4\&\f(CW\*(C`MIME::Base64\*(C'\fR, by Gisle Aas, allows you to encode data in base64,as defined in \s-1RFC\s0 2045 \- \fI\s-1MIME\s0 (Multipurpose Internet MailExtensions)\fR..Sp.Vb 1\& use MIME::Base64;\&\& $encoded = encode_base64(\*(AqAladdin:open sesame\*(Aq);\& $decoded = decode_base64($encoded);\&\& print $encoded, "\en"; # "QWxhZGRpbjpvcGVuIHNlc2FtZQ==".Ve.SpSee MIME::Base64..IP "\(bu" 4\&\f(CW\*(C`MIME::QuotedPrint\*(C'\fR, by Gisle Aas, allows you to encode datain quoted-printable encoding, as defined in \s-1RFC\s0 2045 \- \fI\s-1MIME\s0(Multipurpose Internet Mail Extensions)\fR..Sp.Vb 1\& use MIME::QuotedPrint;\&\& $encoded = encode_qp("\exDE\exAD\exBE\exEF");\& $decoded = decode_qp($encoded);\&\& print $encoded, "\en"; # "=DE=AD=BE=EF\en"\& print $decoded, "\en"; # "\exDE\exAD\exBE\exEF\en".Ve.SpSee also PerlIO::via::QuotedPrint..IP "\(bu" 4\&\f(CW\*(C`NEXT\*(C'\fR, by Damian Conway, is a pseudo-class for method redispatch.See \s-1NEXT\s0..IP "\(bu" 4\&\f(CW\*(C`open\*(C'\fR is a new pragma for setting the default I/O layersfor \fIopen()\fR..IP "\(bu" 4\&\f(CW\*(C`PerlIO::scalar\*(C'\fR, by Nick Ing-Simmons, provides the implementationof \s-1IO\s0 to \*(L"in memory\*(R" Perl scalars as discussed above. It also servesas an example of a loadable PerlIO layer. Other future possibilitiesinclude PerlIO::Array and PerlIO::Code. See PerlIO::scalar..IP "\(bu" 4\&\f(CW\*(C`PerlIO::via\*(C'\fR, by Nick Ing-Simmons, acts as a PerlIO layer and wrapsPerlIO layer functionality provided by a class (typically implementedin Perl code)..IP "\(bu" 4\&\f(CW\*(C`PerlIO::via::QuotedPrint\*(C'\fR, by Elizabeth Mattijsen, is an exampleof a \f(CW\*(C`PerlIO::via\*(C'\fR class:.Sp.Vb 2\& use PerlIO::via::QuotedPrint;\& open($fh,">:via(QuotedPrint)",$path);.Ve.SpThis will automatically convert everything output to \f(CW$fh\fR toQuoted-Printable. See PerlIO::via and PerlIO::via::QuotedPrint..IP "\(bu" 4\&\f(CW\*(C`Pod::ParseLink\*(C'\fR, by Russ Allbery, has been added,to parse L<> links in pods as described in the newperlpodspec..IP "\(bu" 4\&\f(CW\*(C`Pod::Text::Overstrike\*(C'\fR, by Joe Smith, has been added.It converts \s-1POD\s0 data to formatted overstrike text.See Pod::Text::Overstrike. [561+].IP "\(bu" 4\&\f(CW\*(C`Scalar::Util\*(C'\fR is a selection of general-utility scalar subroutines,such as \fIblessed()\fR, \fIreftype()\fR, and \fItainted()\fR. See Scalar::Util..IP "\(bu" 4\&\f(CW\*(C`sort\*(C'\fR is a new pragma for controlling the behaviour of \fIsort()\fR..IP "\(bu" 4\&\f(CW\*(C`Storable\*(C'\fR gives persistence to Perl data structures by allowing thestorage and retrieval of Perl data to and from files in a fast andcompact binary format. Because in effect Storable does serialisationof Perl data structures, with it you can also clone deep, hierarchicaldatastructures. Storable was originally created by Raphael Manfredi,but it is now maintained by Abhijit Menon-Sen. Storable has beenenhanced to understand the two new hash features, Unicode keys andrestricted hashes. See Storable..IP "\(bu" 4\&\f(CW\*(C`Switch\*(C'\fR, by Damian Conway, has been added. Just by saying.Sp.Vb 1\& use Switch;.Ve.Spyou have \f(CW\*(C`switch\*(C'\fR and \f(CW\*(C`case\*(C'\fR available in Perl..Sp.Vb 1\& use Switch;\&\& switch ($val) {\&\& case 1 { print "number 1" }\& case "a" { print "string a" }\& case [1..10,42] { print "number in list" }\& case (@array) { print "number in list" }\& case /\ew+/ { print "pattern" }\& case qr/\ew+/ { print "pattern" }\& case (%hash) { print "entry in hash" }\& case (\e%hash) { print "entry in hash" }\& case (\e&sub) { print "arg to subroutine" }\& else { print "previous case not true" }\& }.Ve.SpSee Switch..IP "\(bu" 4\&\f(CW\*(C`Test::More\*(C'\fR, by Michael Schwern, is yet another framework for writingtest scripts, more extensive than Test::Simple. See Test::More..IP "\(bu" 4\&\f(CW\*(C`Test::Simple\*(C'\fR, by Michael Schwern, has basic utilities for writingtests. See Test::Simple..IP "\(bu" 4\&\f(CW\*(C`Text::Balanced\*(C'\fR, by Damian Conway, has been added, for extractingdelimited text sequences from strings..Sp.Vb 1\& use Text::Balanced \*(Aqextract_delimited\*(Aq;\&\& ($a, $b) = extract_delimited("\*(Aqnever say never\*(Aq, he never said", "\*(Aq", \*(Aq\*(Aq);.Ve.Sp\&\f(CW$a\fR will be \*(L"'never say never'\*(R", \f(CW$b\fR will be ', he never said'..SpIn addition to \fIextract_delimited()\fR, there are also \fIextract_bracketed()\fR,\&\fIextract_quotelike()\fR, \fIextract_codeblock()\fR, \fIextract_variable()\fR,\&\fIextract_tagged()\fR, \fIextract_multiple()\fR, \fIgen_delimited_pat()\fR, and\&\fIgen_extract_tagged()\fR. With these, you can implement rather advancedparsing algorithms. See Text::Balanced..IP "\(bu" 4\&\f(CW\*(C`threads\*(C'\fR, by Arthur Bergman, is an interface to interpreter threads.Interpreter threads (ithreads) is the new thread model introduced inPerl 5.6 but only available as an internal interface for extensionwriters (and for Win32 Perl for \f(CW\*(C`fork()\*(C'\fR emulation). See threads,threads::shared, and perlthrtut..IP "\(bu" 4\&\f(CW\*(C`threads::shared\*(C'\fR, by Arthur Bergman, allows data sharing forinterpreter threads. See threads::shared..IP "\(bu" 4\&\f(CW\*(C`Tie::File\*(C'\fR, by Mark-Jason Dominus, associates a Perl array with thelines of a file. See Tie::File..IP "\(bu" 4\&\f(CW\*(C`Tie::Memoize\*(C'\fR, by Ilya Zakharevich, provides on-demand loaded hashes.See Tie::Memoize..IP "\(bu" 4\&\f(CW\*(C`Tie::RefHash::Nestable\*(C'\fR, by Edward Avis, allows storing hashreferences (unlike the standard Tie::RefHash) The module is containedwithin Tie::RefHash. See Tie::RefHash..IP "\(bu" 4\&\f(CW\*(C`Time::HiRes\*(C'\fR, by Douglas E. Wegscheid, provides high resolutiontiming (ualarm, usleep, and gettimeofday). See Time::HiRes..IP "\(bu" 4\&\f(CW\*(C`Unicode::UCD\*(C'\fR offers a querying interface to the Unicode CharacterDatabase. See Unicode::UCD..IP "\(bu" 4\&\f(CW\*(C`Unicode::Collate\*(C'\fR, by \s-1SADAHIRO\s0 Tomoyuki, implements the \s-1UCA\s0(Unicode Collation Algorithm) for sorting Unicode strings.See Unicode::Collate..IP "\(bu" 4\&\f(CW\*(C`Unicode::Normalize\*(C'\fR, by \s-1SADAHIRO\s0 Tomoyuki, implements the variousUnicode normalization forms. See Unicode::Normalize..IP "\(bu" 4\&\f(CW\*(C`XS::APItest\*(C'\fR, by Tim Jenness, is a test extension that exercises \s-1XS\s0APIs. Currently only \f(CW\*(C`printf()\*(C'\fR is tested: how to output variousbasic data types from \s-1XS\s0..IP "\(bu" 4\&\f(CW\*(C`XS::Typemap\*(C'\fR, by Tim Jenness, is a test extension that exercises\&\s-1XS\s0 typemaps. Nothing gets installed, but the code is worth studyingfor extension writers..Sh "Updated And Improved Modules and Pragmata".IX Subsection "Updated And Improved Modules and Pragmata".IP "\(bu" 4The following independently supported modules have been updated to thenewest versions from \s-1CPAN:\s0 \s-1CGI\s0, \s-1CPAN\s0, DB_File, File::Spec, File::Temp,Getopt::Long, Math::BigFloat, Math::BigInt, the podlators bundle(Pod::Man, Pod::Text), Pod::LaTeX [561+], Pod::Parser, Storable,Term::ANSIColor, Test, Text\-Tabs+Wrap..IP "\(bu" 4\&\fIattributes::reftype()\fR now works on tied arguments..IP "\(bu" 4AutoLoader can now be disabled with \f(CW\*(C`no AutoLoader;\*(C'\fR..IP "\(bu" 4B::Deparse has been significantly enhanced by Robin Houston. It cannow deparse almost all of the standard test suite (so that the testsstill succeed). There is a make target \*(L"test.deparse\*(R" for trying thisout..IP "\(bu" 4Carp now has better interface documentation, and the \f(CW@CARP_NOT\fRinterface has been added to get optional control over where errorsare reported independently of \f(CW@ISA\fR, by Ben Tilly..IP "\(bu" 4Class::Struct can now define the classes in compile time..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" 4The return value of \fICwd::fastcwd()\fR is now tainted..IP "\(bu" 4Data::Dumper now has an option to sort hashes..IP "\(bu" 4Data::Dumper now has an option to dump code referencesusing B::Deparse..IP "\(bu" 4DB_File now supports newer Berkeley \s-1DB\s0 versions, amongother improvements..IP "\(bu" 4Devel::Peek now has an interface for the Perl memory statistics(this works only if you are using perl's malloc, and if you havecompiled with debugging)..IP "\(bu" 4The English module can now be used without the infamous performancehit by saying.Sp.Vb 1\& use English \*(Aq\-no_match_vars\*(Aq;.Ve.Sp(Assuming, of course, that you don't need the troublesome variables\&\f(CW\*(C`$\`\*(C'\fR, \f(CW$&\fR, or \f(CW\*(C`$\*(Aq\*(C'\fR.) Also, introduced \f(CW@LAST_MATCH_START\fR and\&\f(CW@LAST_MATCH_END\fR English aliases for \f(CW\*(C`@\-\*(C'\fR and \f(CW\*(C`@+\*(C'\fR..IP "\(bu" 4ExtUtils::MakeMaker has been significantly cleaned up and fixed.The enhanced version has also been backported to earlier releasesof Perl and submitted to \s-1CPAN\s0 so that the earlier releases canenjoy the fixes..IP "\(bu" 4The arguments of \fIWriteMakefile()\fR in Makefile.PL are now checkedfor sanity much more carefully than before. This may cause newwarnings when modules are being installed. See ExtUtils::MakeMakerfor more details..IP "\(bu" 4ExtUtils::MakeMaker now uses File::Spec internally, which hopefullyleads to better portability..IP "\(bu" 4Fcntl, Socket, and Sys::Syslog have been rewritten by Nicholas Clarkto use the new-style constant dispatch section (see ExtUtils::Constant).This means that they will be more robust and hopefully faster..IP "\(bu" 4File::Find now \fIchdir()\fRs correctly when chasing symbolic links. [561].IP "\(bu" 4File::Find now has pre\- and post-processing callbacks. It alsocorrectly changes directories when chasing symbolic links. Callbacks(naughtily) exiting with \*(L"next;\*(R" instead of \*(L"return;\*(R" now work.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -