📄 perlos2.1
字号:
.Ve.SpSame remark as for \fIperl_ste.zip\fR..IP "Manpages for Perl and utilities" 3.IX Item "Manpages for Perl and utilities".Vb 1\& unzip perl_man.zip \-d f:/perllib/man.Ve.SpThis directory should better be on \f(CW\*(C`MANPATH\*(C'\fR. You need to have aworking \fIman\fR to access these files..IP "Manpages for Perl modules" 3.IX Item "Manpages for Perl modules".Vb 1\& unzip perl_mam.zip \-d f:/perllib/man.Ve.SpThis directory should better be on \f(CW\*(C`MANPATH\*(C'\fR. You need to have aworking man to access these files..IP "Source for Perl documentation" 3.IX Item "Source for Perl documentation".Vb 1\& unzip perl_pod.zip \-d f:/perllib/lib.Ve.SpThis is used by the \f(CW\*(C`perldoc\*(C'\fR program (see perldoc), and may be used togenerate \s-1HTML\s0 documentation usable by \s-1WWW\s0 browsers, anddocumentation in zillions of other formats: \f(CW\*(C`info\*(C'\fR, \f(CW\*(C`LaTeX\*(C'\fR,\&\f(CW\*(C`Acrobat\*(C'\fR, \f(CW\*(C`FrameMaker\*(C'\fR and so on. [Use programs such as\&\fIpod2latex\fR etc.].IP "Perl manual in \fI.INF\fR format" 3.IX Item "Perl manual in .INF format".Vb 1\& unzip perl_inf.zip \-d d:/os2/book.Ve.SpThis directory should better be on \f(CW\*(C`BOOKSHELF\*(C'\fR..IP "Pdksh" 3.IX Item "Pdksh".Vb 1\& unzip perl_sh.zip \-d f:/bin.Ve.SpThis is used by perl to run external commands which explicitlyrequire shell, like the commands using \fIredirection\fR and \fIshellmetacharacters\fR. It is also used instead of explicit \fI/bin/sh\fR..SpSet \f(CW\*(C`PERL_SH_DIR\*(C'\fR (see \*(L"\s-1PERL_SH_DIR\s0\*(R") if you move \fIsh.exe\fR fromthe above location..Sp\&\fBNote.\fR It may be possible to use some other sh-compatible shell (untested)..PPAfter you installed the components you needed and updated the\&\fIConfig.sys\fR correspondingly, you need to hand-edit\&\fIConfig.pm\fR. This file resides somewhere deep in the location youinstalled your perl library, find it out by.PP.Vb 1\& perl \-MConfig \-le "print $INC{\*(AqConfig.pm\*(Aq}".Ve.PPYou need to correct all the entries which look like file paths (theycurrently start with \f(CW\*(C`f:/\*(C'\fR)..Sh "\fBWarning\fP".IX Subsection "Warning"The automatic and manual perl installation leave precompiled pathsinside perl executables. While these paths are overwriteable (see\&\*(L"\s-1PERLLIB_PREFIX\s0\*(R", \*(L"\s-1PERL_SH_DIR\s0\*(R"), some people may preferbinary editing of paths inside the executables/DLLs..SH "Accessing documentation".IX Header "Accessing documentation"Depending on how you built/installed perl you may have (otherwiseidentical) Perl documentation in the following formats:.Sh "\s-1OS/2\s0 \fI.INF\fP file".IX Subsection "OS/2 .INF file"Most probably the most convenient form. Under \s-1OS/2\s0 view it as.PP.Vb 4\& view perl\& view perl perlfunc\& view perl less\& view perl ExtUtils::MakeMaker.Ve.PP(currently the last two may hit a wrong location, but this may improvesoon). Under Win* see \*(L"\s-1SYNOPSIS\s0\*(R"..PPIf you want to build the docs yourself, and have \fI\s-1OS/2\s0 toolkit\fR, run.PP.Vb 1\& pod2ipf > perl.ipf.Ve.PPin \fI/perllib/lib/pod\fR directory, then.PP.Vb 1\& ipfc /inf perl.ipf.Ve.PP(Expect a lot of errors during the both steps.) Now move it on your\&\s-1BOOKSHELF\s0 path..Sh "Plain text".IX Subsection "Plain text"If you have perl documentation in the source form, perl utilitiesinstalled, and \s-1GNU\s0 groff installed, you may use.PP.Vb 3\& perldoc perlfunc\& perldoc less\& perldoc ExtUtils::MakeMaker.Ve.PPto access the perl documentation in the text form (note that you may getbetter results using perl manpages)..PPAlternately, try running pod2text on \fI.pod\fR files..Sh "Manpages".IX Subsection "Manpages"If you have \fIman\fR installed on your system, and you installed perlmanpages, use something like this:.PP.Vb 3\& man perlfunc\& man 3 less\& man ExtUtils.MakeMaker.Ve.PPto access documentation for different components of Perl. Start with.PP.Vb 1\& man perl.Ve.PPNote that dot (\fI.\fR) is used as a package separator for documentationfor packages, and as usual, sometimes you need to give the section \- \f(CW3\fRabove \- to avoid shadowing by the \fI\fIless\fI\|(1) manpage\fR..PPMake sure that the directory \fBabove\fR the directory with manpages ison our \f(CW\*(C`MANPATH\*(C'\fR, like this.PP.Vb 1\& set MANPATH=c:/man;f:/perllib/man.Ve.PPfor Perl manpages in \f(CW\*(C`f:/perllib/man/man1/\*(C'\fR etc..Sh "\s-1HTML\s0".IX Subsection "HTML"If you have some \s-1WWW\s0 browser available, installed the Perldocumentation in the source form, and Perl utilities, you can build\&\s-1HTML\s0 docs. Cd to directory with \fI.pod\fR files, and do like this.PP.Vb 2\& cd f:/perllib/lib/pod\& pod2html.Ve.PPAfter this you can direct your browser the file \fIperl.html\fR in thisdirectory, and go ahead with reading docs, like this:.PP.Vb 1\& explore file:///f:/perllib/lib/pod/perl.html.Ve.PPAlternatively you may be able to get these docs prebuilt from \s-1CPAN\s0..ie n .Sh "\s-1GNU\s0 ""info"" files".el .Sh "\s-1GNU\s0 \f(CWinfo\fP files".IX Subsection "GNU info files"Users of Emacs would appreciate it very much, especially with\&\f(CW\*(C`CPerl\*(C'\fR mode loaded. You need to get latest \f(CW\*(C`pod2texi\*(C'\fR from \f(CW\*(C`CPAN\*(C'\fR,or, alternately, the prebuilt info pages..Sh "\fI\s-1PDF\s0\fP files".IX Subsection "PDF files"for \f(CW\*(C`Acrobat\*(C'\fR are available on \s-1CPAN\s0 (may be for slightly older version ofperl)..ie n .Sh """LaTeX"" docs".el .Sh "\f(CWLaTeX\fP docs".IX Subsection "LaTeX docs"can be constructed using \f(CW\*(C`pod2latex\*(C'\fR..SH "BUILD".IX Header "BUILD"Here we discuss how to build Perl under \s-1OS/2\s0. There is an alternative(but maybe older) view on <http://www.shadow.net/~troc/os2perl.html>..Sh "The short story".IX Subsection "The short story"Assume that you are a seasoned porter, so are sure that all the necessarytools are already present on your system, and you know how to get the Perlsource distribution. Untar it, change to the extract directory, and.PP.Vb 7\& gnupatch \-p0 < os2\ediff.configure\& sh Configure \-des \-D prefix=f:/perllib\& make\& make test\& make install\& make aout_test\& make aout_install.Ve.PPThis puts the executables in f:/perllib/bin. Manually move them to the\&\f(CW\*(C`PATH\*(C'\fR, manually move the built \fIperl*.dll\fR to \f(CW\*(C`LIBPATH\*(C'\fR (here forPerl \s-1DLL\s0 \fI*\fR is a not-very-meaningful hex checksum), and run.PP.Vb 1\& make installcmd INSTALLCMDDIR=d:/ir/on/path.Ve.PPAssuming that the \f(CW\*(C`man\*(C'\fR\-files were put on an appropriate location,this completes the installation of minimal Perl system. (The binarydistribution contains also a lot of additional modules, and thedocumentation in \s-1INF\s0 format.).PPWhat follows is a detailed guide through these steps..Sh "Prerequisites".IX Subsection "Prerequisites"You need to have the latest \s-1EMX\s0 development environment, the full\&\s-1GNU\s0 tool suite (gawk renamed to awk, and \s-1GNU\s0 \fIfind.exe\fRearlier on path than the \s-1OS/2\s0 \fIfind.exe\fR, same with \fIsort.exe\fR, tocheck use.PP.Vb 2\& find \-\-version\& sort \-\-version.Ve.PP). You need the latest version of \fIpdksh\fR installed as \fIsh.exe\fR..PPCheck that you have \fB\s-1BSD\s0\fR libraries and headers installed, and \- optionally \- Berkeley \s-1DB\s0 headers and libraries, and crypt..PPPossible locations to get the files:.PP.Vb 4\& ftp://hobbes.nmsu.edu/os2/unix/\& ftp://ftp.cdrom.com/pub/os2/unix/\& ftp://ftp.cdrom.com/pub/os2/dev32/\& ftp://ftp.cdrom.com/pub/os2/emx09c/.Ve.PPIt is reported that the following archives contain enough utils tobuild perl: \fIgnufutil.zip\fR, \fIgnusutil.zip\fR, \fIgnututil.zip\fR, \fIgnused.zip\fR,\&\fIgnupatch.zip\fR, \fIgnuawk.zip\fR, \fIgnumake.zip\fR, \fIgnugrep.zip\fR, \fIbsddev.zip\fR and\&\fIksh527rt.zip\fR (or a later version). Note that all these utilities areknown to be available from \s-1LEO:\s0.PP.Vb 1\& ftp://ftp.leo.org/pub/comp/os/os2/leo/gnu.Ve.PPNote also that the \fIdb.lib\fR and \fIdb.a\fR from the \s-1EMX\s0 distributionare not suitable for multi-threaded compile (even single-threadedflavor of Perl uses multi-threaded C \s-1RTL\s0, forcompatibility with XFree86\-OS/2). Get a corrected one from.PP.Vb 1\& http://www.ilyaz.org/software/os2/db_mt.zip.Ve.PPIf you have \fIexactly the same version of Perl\fR installed already,make sure that no copies or perl are currently running. Later stepsof the build may fail since an older version of \fIperl.dll\fR loaded intomemory may be found. Running \f(CW\*(C`make test\*(C'\fR becomes meaningless, sincethe test are checking a previous build of perl (this situation is detectedand reported by \fIlib/os2_base.t\fR test). Do not forget to unset\&\f(CW\*(C`PERL_EMXLOAD_SEC\*(C'\fR in environment..PPAlso make sure that you have \fI/tmp\fR directory on the current drive,and \fI.\fR directory in your \f(CW\*(C`LIBPATH\*(C'\fR. One may try to correct thelatter condition by.PP.Vb 1\& set BEGINLIBPATH .\e..Ve.PPif you use something like \fI\s-1CMD\s0.EXE\fR or latest versions of\&\fI4os2.exe\fR. (Setting \s-1BEGINLIBPATH\s0 to just \f(CW\*(C`.\*(C'\fR is ignored by the\&\s-1OS/2\s0 kernel.).PPMake sure your gcc is good for \f(CW\*(C`\-Zomf\*(C'\fR linking: run \f(CW\*(C`omflibs\*(C'\fRscript in \fI/emx/lib\fR directory..PPCheck that you have link386 installed. It comes standard with \s-1OS/2\s0,but may be not installed due to customization. If typing.PP.Vb 1\& link386.Ve.PPshows you do not have it, do \fISelective install\fR, and choose \f(CW\*(C`Linkobject modules\*(C'\fR in \fIOptional system utilities/More\fR. If you get intolink386 prompts, press \f(CW\*(C`Ctrl\-C\*(C'\fR to exit..Sh "Getting perl source".IX Subsection "Getting perl source"You need to fetch the latest perl source (including developersreleases). With some probability it is located in.PP.Vb 2\& http://www.cpan.org/src/5.0\& http://www.cpan.org/src/5.0/unsupported.Ve.PPIf not, you may need to dig in the indices to find it in the directoryof the current maintainer..PPQuick cycle of developers release may break the \s-1OS/2\s0 build time totime, looking into.PP.Vb 1\& http://www.cpan.org/ports/os2/.Ve.PPmay indicate the latest release which was publicly released by themaintainer. Note that the release may include some additional patchesto apply to the current source of perl..PPExtract it like this.PP.Vb 1\& tar vzxf perl5.00409.tar.gz.Ve.PPYou may see a message about errors while extracting \fIConfigure\fR. This isbecause there is a conflict with a similarly-named file \fIconfigure\fR..PPChange to the directory of extraction..Sh "Application of the patches".IX Subsection "Application of the patches"You need to apply the patches in \fI./os2/diff.*\fR like this:.PP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -