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

📄 perl5004delta.pod

📁 MSYS在windows下模拟了一个类unix的终端
💻 POD
📖 第 1 页 / 共 4 页
字号:
=item use localeTells the compiler to enable (or disable) the use of POSIX locales forbuiltin operations.When C<use locale> is in effect, the current LC_CTYPE locale is usedfor regular expressions and case mapping; LC_COLLATE for stringordering; and LC_NUMERIC for numeric formatting in printf and sprintf(but B<not> in print).  LC_NUMERIC is always used in write, sincelexical scoping of formats is problematic at best.Each C<use locale> or C<no locale> affects statements to the end ofthe enclosing BLOCK or, if not inside a BLOCK, to the end of thecurrent file.  Locales can be switched and queried withPOSIX::setlocale().See L<perllocale> for more information.=item use opsDisable unsafe opcodes, or any named opcodes, when compiling Perl code.=item use vmsishEnable VMS-specific language features.  Currently, there are threeVMS-specific features available: 'status', which makes C<$?> andC<system> return genuine VMS status values instead of emulating POSIX;'exit', which makes C<exit> take a genuine VMS status value instead ofassuming that C<exit 1> is an error; and 'time', which makes all timesrelative to the local time zone, in the VMS tradition.=back=head1 Modules=head2 Required UpdatesThough Perl 5.004 is compatible with almost all modules that workwith Perl 5.003, there are a few exceptions:    Module   Required Version for Perl 5.004    ------   -------------------------------    Filter   Filter-1.12    LWP      libwww-perl-5.08    Tk       Tk400.202 (-w makes noise)Also, the majordomo mailing list program, version 1.94.1, doesn't workwith Perl 5.004 (nor with perl 4), because it executes an invalidregular expression.  This bug is fixed in majordomo version 1.94.2.=head2 Installation directoriesThe I<installperl> script now places the Perl source files forextensions in the architecture-specific library directory, which iswhere the shared libraries for extensions have always been.  Thischange is intended to allow administrators to keep the Perl 5.004library directory unchanged from a previous version, without runningthe risk of binary incompatibility between extensions' Perl source andshared libraries.=head2 Module information summaryBrand new modules, arranged by topic rather than strictlyalphabetically:    CGI.pm               Web server interface ("Common Gateway Interface")    CGI/Apache.pm        Support for Apache's Perl module    CGI/Carp.pm          Log server errors with helpful context    CGI/Fast.pm          Support for FastCGI (persistent server process)    CGI/Push.pm          Support for server push    CGI/Switch.pm        Simple interface for multiple server types    CPAN                 Interface to Comprehensive Perl Archive Network    CPAN::FirstTime      Utility for creating CPAN configuration file    CPAN::Nox            Runs CPAN while avoiding compiled extensions    IO.pm                Top-level interface to IO::* classes    IO/File.pm           IO::File extension Perl module    IO/Handle.pm         IO::Handle extension Perl module    IO/Pipe.pm           IO::Pipe extension Perl module    IO/Seekable.pm       IO::Seekable extension Perl module    IO/Select.pm         IO::Select extension Perl module    IO/Socket.pm         IO::Socket extension Perl module    Opcode.pm            Disable named opcodes when compiling Perl code    ExtUtils/Embed.pm    Utilities for embedding Perl in C programs    ExtUtils/testlib.pm  Fixes up @INC to use just-built extension    FindBin.pm           Find path of currently executing program    Class/Struct.pm      Declare struct-like datatypes as Perl classes    File/stat.pm         By-name interface to Perl's builtin stat    Net/hostent.pm       By-name interface to Perl's builtin gethost*    Net/netent.pm        By-name interface to Perl's builtin getnet*    Net/protoent.pm      By-name interface to Perl's builtin getproto*    Net/servent.pm       By-name interface to Perl's builtin getserv*    Time/gmtime.pm       By-name interface to Perl's builtin gmtime    Time/localtime.pm    By-name interface to Perl's builtin localtime    Time/tm.pm           Internal object for Time::{gm,local}time    User/grent.pm        By-name interface to Perl's builtin getgr*    User/pwent.pm        By-name interface to Perl's builtin getpw*    Tie/RefHash.pm       Base class for tied hashes with references as keys    UNIVERSAL.pm         Base class for *ALL* classes=head2 FcntlNew constants in the existing Fcntl modules are now supported,provided that your operating system happens to support them:    F_GETOWN F_SETOWN    O_ASYNC O_DEFER O_DSYNC O_FSYNC O_SYNC    O_EXLOCK O_SHLOCKThese constants are intended for use with the Perl operators sysopen()and fcntl() and the basic database modules like SDBM_File.  For theexact meaning of these and other Fcntl constants please refer to youroperating system's documentation for fcntl() and open().In addition, the Fcntl module now provides these constants for usewith the Perl operator flock():	LOCK_SH LOCK_EX LOCK_NB LOCK_UNThese constants are defined in all environments (because where there isno flock() system call, Perl emulates it).  However, for historicalreasons, these constants are not exported unless they are explicitlyrequested with the ":flock" tag (e.g. C<use Fcntl ':flock'>).=head2 IOThe IO module provides a simple mechanism to load all the IO modules at onego.  Currently this includes:     IO::Handle     IO::Seekable     IO::File     IO::Pipe     IO::SocketFor more information on any of these modules, please see itsrespective documentation.=head2 Math::ComplexThe Math::Complex module has been totally rewritten, and now supportsmore operations.  These are overloaded:     + - * / ** <=> neg ~ abs sqrt exp log sin cos atan2 "" (stringify)And these functions are now exported:    pi i Re Im arg    log10 logn ln cbrt root    tan    csc sec cot    asin acos atan    acsc asec acot    sinh cosh tanh    csch sech coth    asinh acosh atanh    acsch asech acoth    cplx cplxe=head2 Math::TrigThis new module provides a simpler interface to parts of Math::Complex forthose who need trigonometric functions only for real numbers.=head2 DB_FileThere have been quite a few changes made to DB_File. Here are a few ofthe highlights:=over 4=item *Fixed a handful of bugs.=item *By public demand, added support for the standard hash function exists().=item *Made it compatible with Berkeley DB 1.86.=item *Made negative subscripts work with RECNO interface.=item *Changed the default flags from O_RDWR to O_CREAT|O_RDWR and the defaultmode from 0640 to 0666.=item *Made DB_File automatically import the open() constants (O_RDWR,O_CREAT etc.) from Fcntl, if available.=item *Updated documentation.=backRefer to the HISTORY section in DB_File.pm for a complete list ofchanges. Everything after DB_File 1.01 has been added since 5.003.=head2 Net::PingMajor rewrite - support added for both udp echo and real icmp pings.=head2 Object-oriented overrides for builtin operatorsMany of the Perl builtins returning lists now haveobject-oriented overrides.  These are:    File::stat    Net::hostent    Net::netent    Net::protoent    Net::servent    Time::gmtime    Time::localtime    User::grent    User::pwentFor example, you can now say    use File::stat;    use User::pwent;    $his = (stat($filename)->st_uid == pwent($whoever)->pw_uid);=head1 Utility Changes=head2 pod2html=over 4=item Sends converted HTML to standard outputThe I<pod2html> utility included with Perl 5.004 is entirely new.By default, it sends the converted HTML to its standard output,instead of writing it to a file like Perl 5.003's I<pod2html> did.Use the B<--outfile=FILENAME> option to write to a file.=back=head2 xsubpp=over 4=item C<void> XSUBs now default to returning nothingDue to a documentation/implementation bug in previous versions ofPerl, XSUBs with a return type of C<void> have actually beenreturning one value.  Usually that value was the GV for the XSUB,but sometimes it was some already freed or reused value, which wouldsometimes lead to program failure.In Perl 5.004, if an XSUB is declared as returning C<void>, itactually returns no value, i.e. an empty list (though there is abackward-compatibility exception; see below).  If your XSUB reallydoes return an SV, you should give it a return type of C<SV *>.For backward compatibility, I<xsubpp> tries to guess whether aC<void> XSUB is really C<void> or if it wants to return an C<SV *>.It does so by examining the text of the XSUB: if I<xsubpp> findswhat looks like an assignment to C<ST(0)>, it assumes that theXSUB's return type is really C<SV *>.=back=head1 C Language API Changes=over 4=item C<gv_fetchmethod> and C<perl_call_sv>The C<gv_fetchmethod> function finds a method for an object, just likein Perl 5.003.  The GV it returns may be a method cache entry.However, in Perl 5.004, method cache entries are not visible to users;therefore, they can no longer be passed directly to C<perl_call_sv>.Instead, you should use the C<GvCV> macro on the GV to extract its CV,and pass the CV to C<perl_call_sv>.The most likely symptom of passing the result of C<gv_fetchmethod> toC<perl_call_sv> is Perl's producing an "Undefined subroutine called"error on the I<second> call to a given method (since there is no cacheon the first call).=item C<perl_eval_pv>A new function handy for eval'ing strings of Perl code inside C code.This function returns the value from the eval statement, which canbe used instead of fetching globals from the symbol table.  SeeL<perlguts>, L<perlembed> and L<perlcall> for details and examples.=item Extended API for manipulating hashesInternal handling of hash keys has changed.  The old hashtable API isstill fully supported, and will likely remain so.  The additions to theAPI allow passing keys as C<SV*>s, so that C<tied> hashes can be givenreal scalars as keys rather than plain strings (nontied hashes stillcan only use strings as keys).  New extensions must use the new hashaccess functions and macros if they wish to use C<SV*> keys.  Theseadditions also make it feasible to manipulate C<HE*>s (hash entries),which can be more efficient.  See L<perlguts> for details.=back=head1 Documentation ChangesMany of the base and library pods were updated.  Thesenew pods are included in section 1:=over 4=item L<perldelta>This document.=item L<perlfaq>Frequently asked questions.=item L<perllocale>Locale support (internationalization and localization).=item L<perltoot>Tutorial on Perl OO programming.=item L<perlapio>Perl internal IO abstraction interface.=item L<perlmodlib>Perl module library and recommended practice for module creation.Extracted from L<perlmod> (which is much smaller as a result).=item L<perldebug>Although not new, this has been massively updated.=item L<perlsec>Although not new, this has been massively updated.=back=head1 New DiagnosticsSeveral new conditions will trigger warnings that weresilent before.  Some only affect certain platforms.The following new warnings and errors outline these.These messages are classified as follows (listed inincreasing order of desperation):   (W) A warning (optional).   (D) A deprecation (optional).   (S) A severe warning (mandatory).   (F) A fatal error (trappable).   (P) An internal error you should never see (trappable).   (X) A very fatal error (nontrappable).   (A) An alien error message (not generated by Perl).=over 4=item "my" variable %s masks earlier declaration in same scope(W) A lexical variable has been redeclared in the same scope, effectivelyeliminating all access to the previous instance.  This is almost alwaysa typographical error.  Note that the earlier variable will still existuntil the end of the scope or until all closure referents to it aredestroyed.=item %s argument is not a HASH element or slice(F) The argument to delete() must be either a hash element, such as    $foo{$bar}    $ref->[12]->{"susie"}or a hash slice, such as    @foo{$bar, $baz, $xyzzy}    @{$ref->[12]}{"susie", "queue"}=item Allocation too large: %lx(X) You can't allocate more than 64K on an MS-DOS machine.=item Allocation too large(F) You can't allocate more than 2^31+"small amount" bytes.

⌨️ 快捷键说明

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