perlport.pod

来自「MSYS在windows下模拟了一个类unix的终端」· POD 代码 · 共 1,913 行 · 第 1/5 页

POD
1,913
字号
    11charname_.c   c.11charname   (assuming filesystem truncates at 10)The Unix emulation library's translation of filenames to native assumesthat this sort of translation is required, and it allows a user-defined listof known suffixes that it will transpose in this fashion.  This mayseem transparent, but consider that with these rules C<foo/bar/baz.h>and C<foo/bar/h/baz> both map to C<foo.bar.h.baz>, and that C<readdir> andC<glob> cannot and do not attempt to emulate the reverse mapping.  OtherC<.>'s in filenames are translated to C</>.As implied above, the environment accessed through C<%ENV> is global, andthe convention is that program specific environment variables are of theform C<Program$Name>.  Each filesystem maintains a current directory,and the current filesystem's current directory is the B<global> currentdirectory.  Consequently, sociable programs don't change the currentdirectory but rely on full pathnames, and programs (and Makefiles) cannotassume that they can spawn a child process which can change the currentdirectory without affecting its parent (and everyone else for thatmatter).Because native operating system filehandles are global and are currently allocated down from 255, with 0 being a reserved value, the Unix emulationlibrary emulates Unix filehandles.  Consequently, you can't rely onpassing C<STDIN>, C<STDOUT>, or C<STDERR> to your children.The desire of users to express filenames of the formC<< <Foo$Dir>.Bar >> on the command line unquoted causes problems,too: C<``> command output capture has to perform a guessing game.  Itassumes that a string C<< <[^<>]+\$[^<>]> >> is areference to an environment variable, whereas anything else involvingC<< < >> or C<< > >> is redirection, and generally manages to be 99%right.  Of course, the problem remains that scripts cannot rely on anyUnix tools being available, or that any tools found have Unix-like commandline arguments.Extensions and XS are, in theory, buildable by anyone using freetools.  In practice, many don't, as users of the Acorn platform areused to binary distributions.  MakeMaker does run, but no availablemake currently copes with MakeMaker's makefiles; even if and whenthis should be fixed, the lack of a Unix-like shell will causeproblems with makefile rules, especially lines of the form C<cdsdbm && make all>, and anything using quoting."S<RISC OS>" is the proper name for the operating system, but the valuein C<$^O> is "riscos" (because we don't like shouting).=head2 Other perlsPerl has been ported to many platforms that do not fit into any ofthe categories listed above.  Some, such as AmigaOS, Atari MiNT,BeOS, HP MPE/iX, QNX, Plan 9, and VOS, have been well-integratedinto the standard Perl source code kit.  You may need to see theF<ports/> directory on CPAN for information, and possibly binaries,for the likes of: aos, Atari ST, lynxos, riscos, Novell Netware,Tandem Guardian, I<etc.>  (Yes, we know that some of these OSes mayfall under the Unix category, but we are not a standards body.)Some approximate operating system names and their C<$^O> valuesin the "OTHER" category include:    OS            $^O        $Config{'archname'}    ------------------------------------------    Amiga DOS     amigaos    m68k-amigos    MPE/iX        mpeix      PA-RISC1.1See also:=over 4=item *Amiga, F<README.amiga> (installed as L<perlamiga>).=item *Atari, F<README.mint> and Guido Flohr's web pagehttp://stud.uni-sb.de/~gufl0000/=item *Be OS, F<README.beos>=item *HP 300 MPE/iX, F<README.mpeix> and Mark Bixby's web pagehttp://www.bixby.org/mark/perlix.html=item *A free perl5-based PERL.NLM for Novell Netware is available inprecompiled binary and source code form from http://www.novell.com/as well as from CPAN.=item  *Plan 9, F<README.plan9>=back=head1 FUNCTION IMPLEMENTATIONSListed below are functions that are either completely unimplementedor else have been implemented differently on various platforms.Following each description will be, in parentheses, a list ofplatforms that the description applies to.The list may well be incomplete, or even wrong in some places.  Whenin doubt, consult the platform-specific README files in the Perlsource distribution, and any other documentation resources accompanyinga given port.Be aware, moreover, that even among Unix-ish systems there are variations.For many functions, you can also query C<%Config>, exported bydefault from the Config module.  For example, to check whether theplatform has the C<lstat> call, check C<$Config{d_lstat}>.  SeeL<Config> for a full description of available variables.=head2 Alphabetical Listing of Perl Functions=over 8=item -X FILEHANDLE=item -X EXPR=item -XC<-r>, C<-w>, and C<-x> have a limited meaning only; directoriesand applications are executable, and there are no uid/gidconsiderations.  C<-o> is not supported.  (S<Mac OS>)C<-r>, C<-w>, C<-x>, and C<-o> tell whether the file is accessible,which may not reflect UIC-based file protections.  (VMS)C<-s> returns the size of the data fork, not the total size of data forkplus resource fork.  (S<Mac OS>).C<-s> by name on an open file will return the space reserved on disk,rather than the current extent.  C<-s> on an open filehandle returns thecurrent size.  (S<RISC OS>)C<-R>, C<-W>, C<-X>, C<-O> are indistinguishable from C<-r>, C<-w>,C<-x>, C<-o>. (S<Mac OS>, Win32, VMS, S<RISC OS>)C<-b>, C<-c>, C<-k>, C<-g>, C<-p>, C<-u>, C<-A> are not implemented.(S<Mac OS>)C<-g>, C<-k>, C<-l>, C<-p>, C<-u>, C<-A> are not particularly meaningful.(Win32, VMS, S<RISC OS>)C<-d> is true if passed a device spec without an explicit directory.(VMS)C<-T> and C<-B> are implemented, but might misclassify Mac text fileswith foreign characters; this is the case will all platforms, but mayaffect S<Mac OS> often.  (S<Mac OS>)C<-x> (or C<-X>) determine if a file ends in one of the executablesuffixes.  C<-S> is meaningless.  (Win32)C<-x> (or C<-X>) determine if a file has an executable file type.(S<RISC OS>)=item alarm SECONDS=item alarmNot implemented. (Win32)=item binmode FILEHANDLEMeaningless.  (S<Mac OS>, S<RISC OS>)Reopens file and restores pointer; if function fails, underlyingfilehandle may be closed, or pointer may be in a different position.(VMS)The value returned by C<tell> may be affected after the call, andthe filehandle may be flushed. (Win32)=item chmod LISTOnly limited meaning.  Disabling/enabling write permission is mapped tolocking/unlocking the file. (S<Mac OS>)Only good for changing "owner" read-write access, "group", and "other"bits are meaningless. (Win32)Only good for changing "owner" and "other" read-write access. (S<RISC OS>)Access permissions are mapped onto VOS access-control list changes. (VOS)=item chown LISTNot implemented. (S<Mac OS>, Win32, Plan9, S<RISC OS>, VOS)Does nothing, but won't fail. (Win32)=item chroot FILENAME=item chrootNot implemented. (S<Mac OS>, Win32, VMS, Plan9, S<RISC OS>, VOS, VM/ESA)=item crypt PLAINTEXT,SALTMay not be available if library or source was not provided when buildingperl. (Win32)Not implemented. (VOS)=item dbmclose HASHNot implemented. (VMS, Plan9, VOS)=item dbmopen HASH,DBNAME,MODENot implemented. (VMS, Plan9, VOS)=item dump LABELNot useful. (S<Mac OS>, S<RISC OS>)Not implemented. (Win32)Invokes VMS debugger. (VMS)=item exec LISTNot implemented. (S<Mac OS>)Implemented via Spawn. (VM/ESA)Does not automatically flush output handles on some platforms.(SunOS, Solaris, HP-UX)=item fcntl FILEHANDLE,FUNCTION,SCALARNot implemented. (Win32, VMS)=item flock FILEHANDLE,OPERATIONNot implemented (S<Mac OS>, VMS, S<RISC OS>, VOS).Available only on Windows NT (not on Windows 95). (Win32)=item forkNot implemented. (S<Mac OS>, AmigaOS, S<RISC OS>, VOS, VM/ESA)Emulated using multiple interpreters.  See L<perlfork>.  (Win32)Does not automatically flush output handles on some platforms.(SunOS, Solaris, HP-UX)=item getloginNot implemented. (S<Mac OS>, S<RISC OS>)=item getpgrp PIDNot implemented. (S<Mac OS>, Win32, VMS, S<RISC OS>, VOS)=item getppidNot implemented. (S<Mac OS>, Win32, VMS, S<RISC OS>)=item getpriority WHICH,WHONot implemented. (S<Mac OS>, Win32, VMS, S<RISC OS>, VOS, VM/ESA)=item getpwnam NAMENot implemented. (S<Mac OS>, Win32)Not useful. (S<RISC OS>)=item getgrnam NAMENot implemented. (S<Mac OS>, Win32, VMS, S<RISC OS>)=item getnetbyname NAMENot implemented. (S<Mac OS>, Win32, Plan9)=item getpwuid UIDNot implemented. (S<Mac OS>, Win32)Not useful. (S<RISC OS>)=item getgrgid GIDNot implemented. (S<Mac OS>, Win32, VMS, S<RISC OS>)=item getnetbyaddr ADDR,ADDRTYPENot implemented. (S<Mac OS>, Win32, Plan9)=item getprotobynumber NUMBERNot implemented. (S<Mac OS>)=item getservbyport PORT,PROTONot implemented. (S<Mac OS>)=item getpwentNot implemented. (S<Mac OS>, Win32, VM/ESA)=item getgrentNot implemented. (S<Mac OS>, Win32, VMS, VM/ESA)=item gethostentNot implemented. (S<Mac OS>, Win32)=item getnetentNot implemented. (S<Mac OS>, Win32, Plan9)=item getprotoentNot implemented. (S<Mac OS>, Win32, Plan9)=item getserventNot implemented. (Win32, Plan9)=item setpwentNot implemented. (S<Mac OS>, Win32, S<RISC OS>)=item setgrentNot implemented. (S<Mac OS>, Win32, VMS, S<RISC OS>)=item sethostent STAYOPENNot implemented. (S<Mac OS>, Win32, Plan9, S<RISC OS>)=item setnetent STAYOPENNot implemented. (S<Mac OS>, Win32, Plan9, S<RISC OS>)=item setprotoent STAYOPENNot implemented. (S<Mac OS>, Win32, Plan9, S<RISC OS>)=item setservent STAYOPENNot implemented. (Plan9, Win32, S<RISC OS>)=item endpwentNot implemented. (S<Mac OS>, MPE/iX, VM/ESA, Win32)=item endgrentNot implemented. (S<Mac OS>, MPE/iX, S<RISC OS>, VM/ESA, VMS, Win32)=item endhostentNot implemented. (S<Mac OS>, Win32)=item endnetentNot implemented. (S<Mac OS>, Win32, Plan9)=item endprotoentNot implemented. (S<Mac OS>, Win32, Plan9)=item endserventNot implemented. (Plan9, Win32)=item getsockopt SOCKET,LEVEL,OPTNAMENot implemented. (S<Mac OS>, Plan9)

⌨️ 快捷键说明

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