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

📄 perlos2.pod

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 POD
📖 第 1 页 / 共 5 页
字号:
If you read this file _as_is_, just ignore the funny characters yousee. It is written in the POD format (see perlpod manpage) which isspecially designed to be readable as is.=head1 NAMEperlos2 - Perl under OS/2, DOS, Win0.3*, Win0.95 and WinNT.=head1 SYNOPSISOne can read this document in the following formats:	man perlos2	view perl perlos2	explorer perlos2.html	info perlos2to list some (not all may be available simultaneously), or it maybe read I<as is>: either as F<README.os2>, or F<pod/perlos2.pod>.To read the F<.INF> version of documentation (B<very> recommended)outside of OS/2, one needs an IBM's reader (may be available on IBMftp sites (?)  (URL anyone?)) or shipped with PC DOS 7.0 and IBM'sVisual Age C++ 3.5.A copy of a Win* viewer is contained in the "Just add OS/2 Warp" package  ftp://ftp.software.ibm.com/ps/products/os2/tools/jaow/jaow.zipin F<?:\JUST_ADD\view.exe>. This gives one an access to EMX's F<.INF> docs as well (text form is available in F</emx/doc> in EMX's distribution).  There is also a different viewer named xview.Note that if you have F<lynx.exe> or F<netscape.exe> installed, you can follow WWW linksfrom this document in F<.INF> format. If you have EMX docs installed correctly, you can follow library links (you need to have C<view emxbook>working by setting C<EMXBOOK> environment variable as it is describedin EMX docs).=cutContents (This may be a little bit obsolete)  perlos2 - Perl under OS/2, DOS, Win0.3*, Win0.95 and WinNT.       NAME      SYNOPSIS      DESCRIPTION	 -  Target	 -  Other OSes	 -  Prerequisites	 -  Starting Perl programs under OS/2 (and DOS and...)	 -  Starting OS/2 (and DOS) programs under Perl      Frequently asked questions	 -  "It does not work"	 -  I cannot run external programs	 -  I cannot embed perl into my program, or use perl.dll from my	 -  `` and pipe-open do not work under DOS.	 -  Cannot start find.exe "pattern" file      INSTALLATION	 -  Automatic binary installation	 -  Manual binary installation	 -  Warning      Accessing documentation	 -  OS/2 .INF file	 -  Plain text	 -  Manpages	 -  HTML	 -  GNU info files	 -  PDF files	 -  LaTeX docs      BUILD	 -  The short story	 -  Prerequisites	 -  Getting perl source	 -  Application of the patches	 -  Hand-editing	 -  Making	 -  Testing	 -  Installing the built perl	 -  a.out-style build      Build FAQ	 -  Some / became \ in pdksh.	 -  'errno' - unresolved external	 -  Problems with tr or sed	 -  Some problem (forget which ;-)	 -  Library ... not found	 -  Segfault in make	 -  op/sprintf test failure      Specific (mis)features of OS/2 port	 -  setpriority, getpriority	 -  system()	 -  extproc on the first line	 -  Additional modules:	 -  Prebuilt methods:	 -  Prebuilt variables:	 -  Misfeatures	 -  Modifications	 -  Identifying DLLs	 -  Centralized management of resources      Perl flavors	 -  perl.exe	 -  perl_.exe	 -  perl__.exe	 -  perl___.exe	 -  Why strange names?	 -  Why dynamic linking?	 -  Why chimera build?      ENVIRONMENT	 -  PERLLIB_PREFIX	 -  PERL_BADLANG	 -  PERL_BADFREE	 -  PERL_SH_DIR	 -  USE_PERL_FLOCK	 -  TMP or TEMP      Evolution	 -  Text-mode filehandles	 -  Priorities	 -  DLL name mangling: pre 5.6.2	 -  DLL name mangling: 5.6.2 and beyond	 -  DLL forwarder generation	 -  Threading	 -  Calls to external programs	 -  Memory allocation	 -  Threads      BUGS      AUTHOR      SEE ALSO=head1 DESCRIPTION=head2 TargetThe target is to make OS/2 one of the best supported platform forusing/building/developing Perl and I<Perl applications>, as well asmake Perl the best language to use under OS/2. The secondary target isto try to make this work under DOS and Win* as well (but not B<too> hard).The current state is quite close to this target. Known limitations:=over 5=item *Some *nix programs use fork() a lot; with the mostly useful flavors ofperl for OS/2 (there are several built simultaneously) this issupported; but some flavors do not support this (e.g., when Perl iscalled from inside REXX).  Using fork() afterI<use>ing dynamically loading extensions would not work with I<very> oldversions of EMX.=item *You need a separate perl executable F<perl__.exe> (see L<perl__.exe>)if you want to use PM code in your application (as Perl/Tk or OpenGLPerl modules do) without having a text-mode window present.While using the standard F<perl.exe> from a text-mode window is possibletoo, I have seen cases when this causes degradation of the system stability.Using F<perl__.exe> avoids such a degradation.=item *There is no simple way to access WPS objects. The only way I knowis via C<OS2::REXX> and C<SOM> extensions (see L<OS2::REXX>, L<Som>).However, we do not have access toconvenience methods of Object-REXX. (Is it possible at all? I knowof no Object-REXX API.)  The C<SOM> extension (currently in alpha-text)may eventually remove this shortcoming; however, due to the fact thatDII is not supported by the C<SOM> module, using C<SOM> is not asconvenient as one would like it.=backPlease keep this list up-to-date by informing me about other items.=head2 Other OSesSince OS/2 port of perl uses a remarkable EMX environment, it canrun (and build extensions, and - possibly - be built itself) under anyenvironment which can run EMX. The current list is DOS,DOS-inside-OS/2, Win0.3*, Win0.95 and WinNT. Out of many perl flavors,only one works, see L<"perl_.exe">.Note that not all features of Perl are available under theseenvironments. This depends on the features the I<extender> - mostprobably RSX - decided to implement.Cf. L<Prerequisites>.=head2 Prerequisites=over 6=item EMXEMX runtime is required (may be substituted by RSX). Note thatit is possible to make F<perl_.exe> to run under DOS without anyexternal support by binding F<emx.exe>/F<rsx.exe> to it, see L<emxbind>. Notethat under DOS for best results one should use RSX runtime, whichhas much more functions working (like C<fork>, C<popen> and so on). Infact RSX is required if there is no VCPI present. Note theRSX requires DPMI.  Many implementations of DPMI are known to be verybuggy, beware!Only the latest runtime is supported, currently C<0.9d fix 03>. Perl may rununder earlier versions of EMX, but this is not tested.One can get different parts of EMX from, say  http://www.leo.org/pub/comp/os/os2/leo/gnu/emx+gcc/  http://powerusersbbs.com/pub/os2/dev/   [EMX+GCC Development]  http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/The runtime component should have the name F<emxrt.zip>.B<NOTE>. When using F<emx.exe>/F<rsx.exe>, it is enough to have them on your path. Onedoes not need to specify them explicitly (though this  emx perl_.exe -de 0will work as well.)=item RSXTo run Perl on DPMI platforms one needs RSX runtime. This isneeded under DOS-inside-OS/2, Win0.3*, Win0.95 and WinNT (see L<"Other OSes">). RSX would not work with VCPIonly, as EMX would, it requires DMPI.Having RSX and the latest F<sh.exe> one gets a fully functionalB<*nix>-ish environment under DOS, say, C<fork>, C<``> andpipe-C<open> work. In fact, MakeMaker works (for static build), so onecan have Perl development environment under DOS. One can get RSX from, say  ftp://ftp.cdrom.com/pub/os2/emx09c/contrib  ftp://ftp.uni-bielefeld.de/pub/systems/msdos/misc  ftp://ftp.leo.org/pub/comp/os/os2/leo/devtools/emx+gcc/contribContact the author on C<rainer@mathematik.uni-bielefeld.de>.The latest F<sh.exe> with DOS hooks is available in  http://www.ilyaz.org/software/os2/as F<sh_dos.zip> or under similar names starting with C<sh>, C<pdksh> etc.=item HPFSPerl does not care about file systems, but the perl library containsmany files with long names, so to install it intact one needs a filesystem which supports long file names.Note that if you do not plan to build the perl itself, it may bepossible to fool EMX to truncate file names. This is not supported,read EMX docs to see how to do it.=item pdkshTo start external programs with complicated command lines (like withpipes in between, and/or quoting of arguments), Perl uses an externalshell. With EMX port such shell should be named F<sh.exe>, and locatedeither in the wired-in-during-compile locations (usually F<F:/bin>),or in configurable location (see L<"PERL_SH_DIR">).For best results use EMX pdksh. The standard binary (5.2.14 or later) runsunder DOS (with L<RSX>) as well, see  http://www.ilyaz.org/software/os2/=back=head2 Starting Perl programs under OS/2 (and DOS and...)Start your Perl program F<foo.pl> with arguments C<arg1 arg2 arg3> thesame way as on any other platform, by	perl foo.pl arg1 arg2 arg3If you want to specify perl options C<-my_opts> to the perl itself (asopposed to your program), use	perl -my_opts foo.pl arg1 arg2 arg3Alternately, if you use OS/2-ish shell, like CMD or 4os2, putthe following at the start of your perl script:	extproc perl -S -my_optsrename your program to F<foo.cmd>, and start it by typing	foo arg1 arg2 arg3Note that because of stupid OS/2 limitations the full path of the perlscript is not available when you use C<extproc>, thus you are forced touse C<-S> perl switch, and your script should be on the C<PATH>. As a plusside, if you know a full path to your script, you may still start itwith 	perl ../../blah/foo.cmd arg1 arg2 arg3(note that the argument C<-my_opts> is taken care of by the C<extproc> linein your script, see L<C<extproc> on the first line>).To understand what the above I<magic> does, read perl docs about C<-S>switch - see L<perlrun>, and cmdref about C<extproc>:	view perl perlrun	man perlrun	view cmdref extproc	help extprocor whatever method you prefer.There are also endless possibilities to use I<executable extensions> of4os2, I<associations> of WPS and so on... However, if you use*nixish shell (like F<sh.exe> supplied in the binary distribution),you need to follow the syntax specified in L<perlrun/"Switches">.Note that B<-S> switch supports scripts with additional extensions F<.cmd>, F<.btm>, F<.bat>, F<.pl> as well.=head2 Starting OS/2 (and DOS) programs under PerlThis is what system() (see L<perlfunc/system>), C<``> (seeL<perlop/"I/O Operators">), and I<open pipe> (see L<perlfunc/open>)are for. (Avoid exec() (see L<perlfunc/exec>) unless you know what youdo).Note however that to use some of these operators you need to have ash-syntax shell installed (see L<"Pdksh">, L<"Frequently asked questions">), and perl should be able to find it(see L<"PERL_SH_DIR">).The cases when the shell is used are:=over=item 1One-argument system() (see L<perlfunc/system>), exec() (see L<perlfunc/exec>)with redirection or shell meta-characters;=item 2Pipe-open (see L<perlfunc/open>) with the command which contains redirection or shell meta-characters;=item 3Backticks C<``> (see L<perlop/"I/O Operators">) with the command which containsredirection or shell meta-characters;=item 4If the executable called by system()/exec()/pipe-open()/C<``> is a scriptwith the "magic" C<#!> line or C<extproc> line which specifies shell;=item 5If the executable called by system()/exec()/pipe-open()/C<``> is a scriptwithout "magic" line, and C<$ENV{EXECSHELL}> is set to shell;=item 6If the executable called by system()/exec()/pipe-open()/C<``> is notfound (is not this remark obsolete?);=item 7For globbing (see L<perlfunc/glob>, L<perlop/"I/O Operators">)(obsolete? Perl uses builtin globbing nowadays...).=backFor the sake of speed for a common case, in the above algorithms backslashes in the command name are not considered as shell metacharacters.Perl starts scripts which begin with cookiesC<extproc> or C<#!> directly, without an intervention of shell.  Perl uses thesame algorithm to find the executable as F<pdksh>: if the pathon C<#!> line does not work, and contains C</>, then the directorypart of the executable is ignored, and the executableis searched in F<.> and on C<PATH>.  To find arguments for these scriptsPerl uses a different algorithm than F<pdksh>: up to 3 arguments are recognized, and trailing whitespace is stripped.If a scriptdoes not contain such a cooky, then to avoid calling F<sh.exe>, Perl usesthe same algorithm as F<pdksh>: if C<$ENV{EXECSHELL}> is set, thescript is given as the first argument to this command, if not set, thenC<$ENV{COMSPEC} /c> is used (or a hardwired guess if C<$ENV{COMSPEC}> isnot set).When starting scripts directly, Perl uses exactly the same algorithm as for the search of script given by B<-S> command-line option: it will look inthe current directory, then on components of C<$ENV{PATH}> using the following order of appended extensions: no extension, F<.cmd>, F<.btm>, F<.bat>, F<.pl>.Note that Perl will start to look for scripts only if OS/2 cannot start the

⌨️ 快捷键说明

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