📄 perlvms.1
字号:
.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05).\".\" Standard preamble:.\" ========================================================================.de Sh \" Subsection heading.br.if t .Sp.ne 5.PP\fB\\$1\fR.PP...de Sp \" Vertical space (when we can't use .PP).if t .sp .5v.if n .sp...de Vb \" Begin verbatim text.ft CW.nf.ne \\$1...de Ve \" End verbatim text.ft R.fi...\" Set up some character translations and predefined strings. \*(-- will.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left.\" double quote, and \*(R" will give a right double quote. \*(C+ will.\" give a nicer C++. Capital omega is used to do unbreakable dashes and.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,.\" nothing in troff, for use with C<>..tr \(*W-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'.ie n \{\. ds -- \(*W-. ds PI pi. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch. ds L" "". ds R" "". ds C` "". ds C' ""'br\}.el\{\. ds -- \|\(em\|. ds PI \(*p. ds L" ``. ds R" '''br\}.\".\" Escape single quotes in literal strings from groff's Unicode transform..ie \n(.g .ds Aq \(aq.el .ds Aq '.\".\" If the F register is turned on, we'll generate index entries on stderr for.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index.\" entries marked with X<> in POD. Of course, you'll have to process the.\" output yourself in some meaningful fashion..ie \nF \{\. de IX. tm Index:\\$1\t\\n%\t"\\$2"... nr % 0. rr F.\}.el \{\. de IX...\}.\".\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2)..\" Fear. Run. Save yourself. No user-serviceable parts.. \" fudge factors for nroff and troff.if n \{\. ds #H 0. ds #V .8m. ds #F .3m. ds #[ \f1. ds #] \fP.\}.if t \{\. ds #H ((1u-(\\\\n(.fu%2u))*.13m). ds #V .6m. ds #F 0. ds #[ \&. ds #] \&.\}. \" simple accents for nroff and troff.if n \{\. ds ' \&. ds ` \&. ds ^ \&. ds , \&. ds ~ ~. ds /.\}.if t \{\. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u". ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'.\}. \" troff and (daisy-wheel) nroff accents.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'.ds 8 \h'\*(#H'\(*b\h'-\*(#H'.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#].ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#].ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#].ds ae a\h'-(\w'a'u*4/10)'e.ds Ae A\h'-(\w'A'u*4/10)'E. \" corrections for vroff.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'. \" for low resolution devices (crt and lpr).if \n(.H>23 .if \n(.V>19 \\{\. ds : e. ds 8 ss. ds o a. ds d- d\h'-1'\(ga. ds D- D\h'-1'\(hy. ds th \o'bp'. ds Th \o'LP'. ds ae ae. ds Ae AE.\}.rm #[ #] #H #V #F C.\" ========================================================================.\".IX Title "PERLVMS 1".TH PERLVMS 1 "2007-12-18" "perl v5.10.0" "Perl Programmers Reference Guide".\" For nroff, turn off justification. Always turn off hyphenation; it makes.\" way too many mistakes in technical documents..if n .ad l.nh.SH "NAME"perlvms \- VMS\-specific documentation for Perl.SH "DESCRIPTION".IX Header "DESCRIPTION"Gathered below are notes describing details of Perl 5's behavior on \s-1VMS\s0. They are a supplement to the regular Perl 5 documentation, so we have focussed on the ways in which Perl 5 functions differently under \s-1VMS\s0 than it does under Unix, and on the interactions between Perl and the rest of the operating system. We haven't tried to duplicate complete descriptions of Perl features from the main Perl documentation, which can be found in the \fI[.pod]\fR subdirectory of the Perl distribution..PPWe hope these notes will save you from confusion and lost sleep when writing Perl scripts on \s-1VMS\s0. If you find we've missed something you think should appear here, please don't hesitate to drop a line to vmsperl@perl.org..SH "Installation".IX Header "Installation"Directions for building and installing Perl 5 can be found in the file \fI\s-1README\s0.vms\fR in the main source directory of the Perl distribution...SH "Organization of Perl Images".IX Header "Organization of Perl Images".Sh "Core Images".IX Subsection "Core Images"During the installation process, three Perl images are produced.\&\fIMiniperl.Exe\fR is an executable image which contains all ofthe basic functionality of Perl, but cannot take advantage ofPerl extensions. It is used to generate several files neededto build the complete Perl and various extensions. Once you'vefinished installing Perl, you can delete this image..PPMost of the complete Perl resides in the shareable image\&\fIPerlShr.Exe\fR, which provides a core to which the Perl executableimage and all Perl extensions are linked. You should place thisimage in \fISys$Share\fR, or define the logical name \fIPerlShr\fR totranslate to the full file specification of this image. It shouldbe world readable. (Remember that if a user has execute only accessto \fIPerlShr\fR, \s-1VMS\s0 will treat it as if it were a privileged shareableimage, and will therefore require all downstream shareable images to beINSTALLed, etc.).PPFinally, \fIPerl.Exe\fR is an executable image containing the mainentry point for Perl, as well as some initialization code. Itshould be placed in a public directory, and made world executable.In order to run Perl with command line arguments, you shoulddefine a foreign command to invoke this image..Sh "Perl Extensions".IX Subsection "Perl Extensions"Perl extensions are packages which provide both \s-1XS\s0 and Perl codeto add new functionality to perl. (\s-1XS\s0 is a meta-language whichsimplifies writing C code which interacts with Perl, seeperlxs for more details.) The Perl code for anextension is treated like any other library module \- it'smade available in your script through the appropriate\&\f(CW\*(C`use\*(C'\fR or \f(CW\*(C`require\*(C'\fR statement, and usually defines a Perlpackage containing the extension..PPThe portion of the extension provided by the \s-1XS\s0 code may beconnected to the rest of Perl in either of two ways. In the\&\fBstatic\fR configuration, the object code for the extension islinked directly into \fIPerlShr.Exe\fR, and is initialized wheneverPerl is invoked. In the \fBdynamic\fR configuration, the extension'smachine code is placed into a separate shareable image, which ismapped by Perl's DynaLoader when the extension is \f(CW\*(C`use\*(C'\fRd or\&\f(CW\*(C`require\*(C'\fRd in your script. This allows you to maintain theextension as a separate entity, at the cost of keeping track of theadditional shareable image. Most extensions can be set up as eitherstatic or dynamic..PPThe source code for an extension usually resides in its owndirectory. At least three files are generally provided:\&\fIExtshortname\fR\fI.xs\fR (where \fIExtshortname\fR is the portion ofthe extension's name following the last \f(CW\*(C`::\*(C'\fR), containingthe \s-1XS\s0 code, \fIExtshortname\fR\fI.pm\fR, the Perl library modulefor the extension, and \fIMakefile.PL\fR, a Perl script which usesthe \f(CW\*(C`MakeMaker\*(C'\fR library modules supplied with Perl to generatea \fIDescrip.MMS\fR file for the extension..Sh "Installing static extensions".IX Subsection "Installing static extensions"Since static extensions are incorporated directly into\&\fIPerlShr.Exe\fR, you'll have to rebuild Perl to incorporate anew extension. You should edit the main \fIDescrip.MMS\fR or \fIMakefile\fRyou use to build Perl, adding the extension's name to the \f(CW\*(C`ext\*(C'\fRmacro, and the extension's object file to the \f(CW\*(C`extobj\*(C'\fR macro.You'll also need to build the extension's object file, eitherby adding dependencies to the main \fIDescrip.MMS\fR, or using aseparate \fIDescrip.MMS\fR for the extension. Then, rebuild\&\fIPerlShr.Exe\fR to incorporate the new code..PPFinally, you'll need to copy the extension's Perl librarymodule to the \fI[.\fR\fIExtname\fR\fI]\fR subdirectory under oneof the directories in \f(CW@INC\fR, where \fIExtname\fR is the nameof the extension, with all \f(CW\*(C`::\*(C'\fR replaced by \f(CW\*(C`.\*(C'\fR (e.g.the library module for extension Foo::Bar would be copiedto a \fI[.Foo.Bar]\fR subdirectory)..Sh "Installing dynamic extensions".IX Subsection "Installing dynamic extensions"In general, the distributed kit for a Perl extension includesa file named Makefile.PL, which is a Perl program which is usedto create a \fIDescrip.MMS\fR file which can be used to build andinstall the files required by the extension. The kit should beunpacked into a directory tree \fBnot\fR under the main Perl sourcedirectory, and the procedure for building the extension is simply.PP.Vb 4\& $ perl Makefile.PL ! Create Descrip.MMS\& $ mmk ! Build necessary files\& $ mmk test ! Run test code, if supplied\& $ mmk install ! Install into public Perl tree.Ve.PP\&\fIN.B.\fR The procedure by which extensions are built andtested creates several levels (at least 4) under thedirectory in which the extension's source files live.For this reason if you are running a version of \s-1VMS\s0 priorto V7.1 you shouldn't nest the source directorytoo deeply in your directory structure lest you exceed \s-1RMS\s0'maximum of 8 levels of subdirectory in a filespec. (Youcan use rooted logical names to get another 8 levels ofnesting, if you can't place the files near the top of
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -