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

📄 perl5004delta.1

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 1
📖 第 1 页 / 共 5 页
字号:
.PDLooks for MakeMaker-like \fI'blib'\fR directory structure starting in\&\fIdir\fR (or current directory) and working back up to five levels ofparent directories..SpIntended for use on command line with \fB\-M\fR option as a way of testingarbitrary scripts against an uninstalled version of a package..IP "use constant \s-1NAME\s0 => \s-1VALUE\s0" 4.IX Item "use constant NAME => VALUE"Provides a convenient interface for creating compile-time constants,See \*(L"Constant Functions\*(R" in perlsub..IP "use locale" 4.IX Item "use locale"Tells the compiler to enable (or disable) the use of \s-1POSIX\s0 locales forbuiltin operations..SpWhen \f(CW\*(C`use locale\*(C'\fR is in effect, the current \s-1LC_CTYPE\s0 locale is usedfor regular expressions and case mapping; \s-1LC_COLLATE\s0 for stringordering; and \s-1LC_NUMERIC\s0 for numeric formatting in printf and sprintf(but \fBnot\fR in print).  \s-1LC_NUMERIC\s0 is always used in write, sincelexical scoping of formats is problematic at best..SpEach \f(CW\*(C`use locale\*(C'\fR or \f(CW\*(C`no locale\*(C'\fR affects statements to the end ofthe enclosing \s-1BLOCK\s0 or, if not inside a \s-1BLOCK\s0, to the end of thecurrent file.  Locales can be switched and queried with\&\fIPOSIX::setlocale()\fR..SpSee perllocale for more information..IP "use ops" 4.IX Item "use ops"Disable unsafe opcodes, or any named opcodes, when compiling Perl code..IP "use vmsish" 4.IX Item "use vmsish"Enable VMS-specific language features.  Currently, there are threeVMS-specific features available: 'status', which makes \f(CW$?\fR and\&\f(CW\*(C`system\*(C'\fR return genuine \s-1VMS\s0 status values instead of emulating \s-1POSIX\s0;\&'exit', which makes \f(CW\*(C`exit\*(C'\fR take a genuine \s-1VMS\s0 status value instead ofassuming that \f(CW\*(C`exit 1\*(C'\fR is an error; and 'time', which makes all timesrelative to the local time zone, in the \s-1VMS\s0 tradition..SH "Modules".IX Header "Modules".Sh "Required Updates".IX Subsection "Required Updates"Though Perl 5.004 is compatible with almost all modules that workwith Perl 5.003, there are a few exceptions:.PP.Vb 5\&    Module   Required Version for Perl 5.004\&    \-\-\-\-\-\-   \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\&    Filter   Filter\-1.12\&    LWP      libwww\-perl\-5.08\&    Tk       Tk400.202 (\-w makes noise).Ve.PPAlso, 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..Sh "Installation directories".IX Subsection "Installation directories"The \fIinstallperl\fR 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..Sh "Module information summary".IX Subsection "Module information summary"Brand new modules, arranged by topic rather than strictlyalphabetically:.PP.Vb 6\&    CGI.pm               Web server interface ("Common Gateway Interface")\&    CGI/Apache.pm        Support for Apache\*(Aqs 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\*(Aqs builtin stat\&    Net/hostent.pm       By\-name interface to Perl\*(Aqs builtin gethost*\&    Net/netent.pm        By\-name interface to Perl\*(Aqs builtin getnet*\&    Net/protoent.pm      By\-name interface to Perl\*(Aqs builtin getproto*\&    Net/servent.pm       By\-name interface to Perl\*(Aqs builtin getserv*\&    Time/gmtime.pm       By\-name interface to Perl\*(Aqs builtin gmtime\&    Time/localtime.pm    By\-name interface to Perl\*(Aqs builtin localtime\&    Time/tm.pm           Internal object for Time::{gm,local}time\&    User/grent.pm        By\-name interface to Perl\*(Aqs builtin getgr*\&    User/pwent.pm        By\-name interface to Perl\*(Aqs builtin getpw*\&\&    Tie/RefHash.pm       Base class for tied hashes with references as keys\&\&    UNIVERSAL.pm         Base class for *ALL* classes.Ve.Sh "Fcntl".IX Subsection "Fcntl"New constants in the existing Fcntl modules are now supported,provided that your operating system happens to support them:.PP.Vb 3\&    F_GETOWN F_SETOWN\&    O_ASYNC O_DEFER O_DSYNC O_FSYNC O_SYNC\&    O_EXLOCK O_SHLOCK.Ve.PPThese constants are intended for use with the Perl operators \fIsysopen()\fRand \fIfcntl()\fR 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 \fIfcntl()\fR and \fIopen()\fR..PPIn addition, the Fcntl module now provides these constants for usewith the Perl operator \fIflock()\fR:.PP.Vb 1\&        LOCK_SH LOCK_EX LOCK_NB LOCK_UN.Ve.PPThese constants are defined in all environments (because where there isno \fIflock()\fR system call, Perl emulates it).  However, for historicalreasons, these constants are not exported unless they are explicitlyrequested with the \*(L":flock\*(R" tag (e.g. \f(CW\*(C`use Fcntl \*(Aq:flock\*(Aq\*(C'\fR)..Sh "\s-1IO\s0".IX Subsection "IO"The \s-1IO\s0 module provides a simple mechanism to load all the \s-1IO\s0 modules at onego.  Currently this includes:.PP.Vb 5\&     IO::Handle\&     IO::Seekable\&     IO::File\&     IO::Pipe\&     IO::Socket.Ve.PPFor more information on any of these modules, please see itsrespective documentation..Sh "Math::Complex".IX Subsection "Math::Complex"The Math::Complex module has been totally rewritten, and now supportsmore operations.  These are overloaded:.PP.Vb 1\&     + \- * / ** <=> neg ~ abs sqrt exp log sin cos atan2 "" (stringify).Ve.PPAnd these functions are now exported:.PP.Vb 11\&    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.Ve.Sh "Math::Trig".IX Subsection "Math::Trig"This new module provides a simpler interface to parts of Math::Complex forthose who need trigonometric functions only for real numbers..Sh "DB_File".IX Subsection "DB_File"There have been quite a few changes made to DB_File. Here are a few ofthe highlights:.IP "\(bu" 4Fixed a handful of bugs..IP "\(bu" 4By public demand, added support for the standard hash function \fIexists()\fR..IP "\(bu" 4Made it compatible with Berkeley \s-1DB\s0 1.86..IP "\(bu" 4Made negative subscripts work with \s-1RECNO\s0 interface..IP "\(bu" 4Changed the default flags from O_RDWR to O_CREAT|O_RDWR and the defaultmode from 0640 to 0666..IP "\(bu" 4Made DB_File automatically import the \fIopen()\fR constants (O_RDWR,O_CREAT etc.) from Fcntl, if available..IP "\(bu" 4Updated documentation..PPRefer to the \s-1HISTORY\s0 section in DB_File.pm for a complete list ofchanges. Everything after DB_File 1.01 has been added since 5.003..Sh "Net::Ping".IX Subsection "Net::Ping"Major rewrite \- support added for both udp echo and real icmp pings..Sh "Object-oriented overrides for builtin operators".IX Subsection "Object-oriented overrides for builtin operators"Many of the Perl builtins returning lists now haveobject-oriented overrides.  These are:.PP.Vb 9\&    File::stat\&    Net::hostent\&    Net::netent\&    Net::protoent\&    Net::servent\&    Time::gmtime\&    Time::localtime\&    User::grent\&    User::pwent.Ve.PPFor example, you can now say.PP.Vb 3\&    use File::stat;\&    use User::pwent;\&    $his = (stat($filename)\->st_uid == pwent($whoever)\->pw_uid);.Ve.SH "Utility Changes".IX Header "Utility Changes".Sh "pod2html".IX Subsection "pod2html".IP "Sends converted \s-1HTML\s0 to standard output" 4.IX Item "Sends converted HTML to standard output"The \fIpod2html\fR utility included with Perl 5.004 is entirely new.By default, it sends the converted \s-1HTML\s0 to its standard output,instead of writing it to a file like Perl 5.003's \fIpod2html\fR did.Use the \fB\-\-outfile=FILENAME\fR option to write to a file..Sh "xsubpp".IX Subsection "xsubpp".ie n .IP """void"" XSUBs now default to returning nothing" 4.el .IP "\f(CWvoid\fR XSUBs now default to returning nothing" 4.IX Item "void XSUBs now default to returning nothing"Due to a documentation/implementation bug in previous versions ofPerl, XSUBs with a return type of \f(CW\*(C`void\*(C'\fR have actually beenreturning one value.  Usually that value was the \s-1GV\s0 for the \s-1XSUB\s0,but sometimes it was some already freed or reused value, which wouldsometimes lead to program failure..SpIn Perl 5.004, if an \s-1XSUB\s0 is declared as returning \f(CW\*(C`void\*(C'\fR, itactually returns no value, i.e. an empty list (though there is abackward-compatibility exception; see below).  If your \s-1XSUB\s0 reallydoes return an \s-1SV\s0, you should give it a return type of \f(CW\*(C`SV *\*(C'\fR..SpFor backward compatibility, \fIxsubpp\fR tries to guess whether a\&\f(CW\*(C`void\*(C'\fR \s-1XSUB\s0 is really \f(CW\*(C`void\*(C'\fR or if it wants to return an \f(CW\*(C`SV *\*(C'\fR.It does so by examining the text of the \s-1XSUB:\s0 if \fIxsubpp\fR findswhat looks like an assignment to \f(CWST(0)\fR, it assumes that the\&\s-1XSUB\s0's return type is really \f(CW\*(C`SV *\*(C'\fR..SH "C Language API Changes".IX Header "C Language API Changes".ie n .IP """gv_fetchmethod""\fR and \f(CW""perl_call_sv""" 4.el .IP "\f(CWgv_fetchmethod\fR and \f(CWperl_call_sv\fR" 4.IX Item "gv_fetchmethod and perl_call_sv"The \f(CW\*(C`gv_fetchmethod\*(C'\fR function finds a method for an object, just likein Perl 5.003.  The \s-1GV\s0 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 \f(CW\*(C`perl_call_sv\*(C'\fR.Instead, you should use the \f(CW\*(C`GvCV\*(C'\fR macro on the \s-1GV\s0 to extract its \s-1CV\s0,and pass the \s-1CV\s0 to \f(CW\*(C`perl_call_sv\*(C'\fR..SpThe most likely symptom of passing the result of \f(CW\*(C`gv_fetchmethod\*(C'\fR to\&\f(CW\*(C`perl_call_sv\*(C'\fR is Perl's producing an \*(L"Undefined subroutine called\*(R"error on the \fIsecond\fR call to a given method (since there is no cacheon the first call)..ie n .IP """perl_eval_pv""" 4.el .IP "\f(CWperl_eval_pv\fR" 4.IX Item "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.  Seeperlguts, perlembed and perlcall for details and examples..IP "Extended \s-1API\s0 for manipulating hashes" 4.IX Item "Extended API for manipulating hashes"Internal handling of hash keys has changed.  The old hashtable \s-1API\s0 isstill fully supported, and will likely remain so.  The additions to the\&\s-1API\s0 allow passing keys as \f(CW\*(C`SV*\*(C'\fRs, so that \f(CW\*(C`tied\*(C'\fR 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 \f(CW\*(C`SV*\*(C'\fR keys.  These

⌨️ 快捷键说明

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