perlport.pod
来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· POD 代码 · 共 1,586 行 · 第 1/5 页
POD
1,586 行
}Also see:=over 4=item *F<README.vos> (installed as L<perlvos>)=item *The VOS mailing list.There is no specific mailing list for Perl on VOS. You can postcomments to the comp.sys.stratus newsgroup, or subscribe to the generalStratus mailing list. Send a letter with "subscribe Info-Stratus" inthe message body to majordomo@list.stratagy.com.=item *VOS Perl on the web at http://ftp.stratus.com/pub/vos/posix/posix.html=back=head2 EBCDIC PlatformsRecent versions of Perl have been ported to platforms such as OS/400 onAS/400 minicomputers as well as OS/390, VM/ESA, and BS2000 for S/390Mainframes. Such computers use EBCDIC character sets internally (usuallyCharacter Code Set ID 0037 for OS/400 and either 1047 or POSIX-BC for S/390systems). On the mainframe perl currently works under the "Unix systemservices for OS/390" (formerly known as OpenEdition), VM/ESA OpenEdition, orthe BS200 POSIX-BC system (BS2000 is supported in perl 5.6 and greater).See L<perlos390> for details. Note that for OS/400 there is also a port ofPerl 5.8.1/5.9.0 or later to the PASE which is ASCII-based (as opposed toILE which is EBCDIC-based), see L<perlos400>. As of R2.5 of USS for OS/390 and Version 2.3 of VM/ESA these Unixsub-systems do not support the C<#!> shebang trick for script invocation.Hence, on OS/390 and VM/ESA perl scripts can be executed with a headersimilar to the following simple script: : # use perl eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}' if 0; #!/usr/local/bin/perl # just a comment really print "Hello from perl!\n";OS/390 will support the C<#!> shebang trick in release 2.8 and beyond.Calls to C<system> and backticks can use POSIX shell syntax on allS/390 systems.On the AS/400, if PERL5 is in your library list, you may needto wrap your perl scripts in a CL procedure to invoke them like so: BEGIN CALL PGM(PERL5/PERL) PARM('/QOpenSys/hello.pl') ENDPGMThis will invoke the perl script F<hello.pl> in the root of theQOpenSys file system. On the AS/400 calls to C<system> or backticksmust use CL syntax.On these platforms, bear in mind that the EBCDIC character set may havean effect on what happens with some perl functions (such as C<chr>,C<pack>, C<print>, C<printf>, C<ord>, C<sort>, C<sprintf>, C<unpack>), aswell as bit-fiddling with ASCII constants using operators like C<^>, C<&>and C<|>, not to mention dealing with socket interfaces to ASCII computers(see L<"Newlines">).Fortunately, most web servers for the mainframe will correctlytranslate the C<\n> in the following statement to its ASCII equivalent(C<\r> is the same under both Unix and OS/390 & VM/ESA): print "Content-type: text/html\r\n\r\n";The values of C<$^O> on some of these platforms includes: uname $^O $Config{'archname'} -------------------------------------------- OS/390 os390 os390 OS400 os400 os400 POSIX-BC posix-bc BS2000-posix-bc VM/ESA vmesa vmesaSome simple tricks for determining if you are running on an EBCDICplatform could include any of the following (perhaps all): if ("\t" eq "\05") { print "EBCDIC may be spoken here!\n"; } if (ord('A') == 193) { print "EBCDIC may be spoken here!\n"; } if (chr(169) eq 'z') { print "EBCDIC may be spoken here!\n"; }One thing you may not want to rely on is the EBCDIC encodingof punctuation characters since these may differ from code page to codepage (and once your module or script is rumoured to work with EBCDIC,folks will want it to work with all EBCDIC character sets).Also see:=over 4=item *L<perlos390>, F<README.os390>, F<perlbs2000>, F<README.vmesa>,L<perlebcdic>.=item *The perl-mvs@perl.org list is for discussion of porting issues as well asgeneral usage issues for all EBCDIC Perls. Send a message body of"subscribe perl-mvs" to majordomo@perl.org.=item *AS/400 Perl information athttp://as400.rochester.ibm.com/as well as on CPAN in the F<ports/> directory.=back=head2 Acorn RISC OSBecause Acorns use ASCII with newlines (C<\n>) in text files as C<\012> likeUnix, and because Unix filename emulation is turned on by default, most simple scripts will probably work "out of the box". The nativefilesystem is modular, and individual filesystems are free to becase-sensitive or insensitive, and are usually case-preserving. Somenative filesystems have name length limits, which file and directorynames are silently truncated to fit. Scripts should be aware that thestandard filesystem currently has a name length limit of B<10>characters, with up to 77 items in a directory, but other filesystemsmay not impose such limitations.Native filenames are of the form Filesystem#Special_Field::DiskName.$.Directory.Directory.Filewhere Special_Field is not usually present, but may contain . and $ . Filesystem =~ m|[A-Za-z0-9_]| DsicName =~ m|[A-Za-z0-9_/]| $ represents the root directory . is the path separator @ is the current directory (per filesystem but machine global) ^ is the parent directory Directory and File =~ m|[^\0- "\.\$\%\&:\@\\^\|\177]+|The default filename translation is roughly C<tr|/.|./|;>Note that C<"ADFS::HardDisk.$.File" ne 'ADFS::HardDisk.$.File'> and thatthe second stage of C<$> interpolation in regular expressions will fallfoul of the C<$.> if scripts are not careful.Logical paths specified by system variables containing comma-separatedsearch lists are also allowed; hence C<System:Modules> is a validfilename, and the filesystem will prefix C<Modules> with each section ofC<System$Path> until a name is made that points to an object on disk.Writing to a new file C<System:Modules> would be allowed only ifC<System$Path> contains a single item list. The filesystem will alsoexpand system variables in filenames if enclosed in angle brackets, soC<< <System$Dir>.Modules >> would look for the fileS<C<$ENV{'System$Dir'} . 'Modules'>>. The obvious implication of this isthat B<fully qualified filenames can start with C<< <> >>> and shouldbe protected when C<open> is used for input.Because C<.> was in use as a directory separator and filenames could notbe assumed to be unique after 10 characters, Acorn implemented the Ccompiler to strip the trailing C<.c> C<.h> C<.s> and C<.o> suffix fromfilenames specified in source code and store the respective files insubdirectories named after the suffix. Hence files are translated: foo.h h.foo C:foo.h C:h.foo (logical path variable) sys/os.h sys.h.os (C compiler groks Unix-speak) 10charname.c c.10charname 10charname.o o.10charname 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 BeOS beos 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 *S<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 -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
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?