📄 perlmodinstall.1
字号:
\&\fBIf you're using a Macintosh with \*(L"Classic\*(R" MacOS and MacPerl,\fR.SpA. \s-1DECOMPRESS\s0.SpFirst, make sure you have the latest \fBcpan-mac\fR distribution (http://www.cpan.org/authors/id/CNANDOR/ ), which has utilities fordoing all of the steps. Read the cpan-mac directions carefully andinstall it. If you choose not to use cpan-mac for some reason, thereare alternatives listed here..SpAfter installing cpan-mac, drop the module archive on the\&\fBuntarzipme\fR droplet, which will decompress and unpack for you..Sp\&\fBOr\fR, you can either use the shareware \fBStuffIt Expander\fR program( http://www.aladdinsys.com/expander/ )in combination with \fBDropStuff with Expander Enhancer\fR( http://www.aladdinsys.com/dropstuff/ )or the freeware \fBMacGzip\fR program (http://persephone.cps.unizar.es/general/gente/spd/gzip/gzip.html )..SpB. \s-1UNPACK\s0.SpIf you're using untarzipme or StuffIt, the archive should be extractednow. \fBOr\fR, you can use the freeware \fBsuntar\fR or \fITar\fR (http://hyperarchive.lcs.mit.edu/HyperArchive/Archive/cmp/ )..SpC. \s-1BUILD\s0.SpCheck the contents of the distribution.Read the module's documentation, looking forreasons why you might have trouble using it with MacPerl. Look for\&\fI.xs\fR and \fI.c\fR files, which normally denote that the distributionmust be compiled, and you cannot install it \*(L"out of the box.\*(R"(See \*(L"\s-1PORTABILITY\s0\*(R".).SpIf a module does not work on MacPerl but should, or needs to becompiled, see if the module exists already as a port on theMacPerl Module Porters site ( http://pudge.net/mmp/ ).For more information on doing \s-1XS\s0 with MacPerl yourself, seeArved Sandstrom's \s-1XS\s0 tutorial ( http://macperl.com/depts/Tutorials/ ),and then consider uploading your binary to the \s-1CPAN\s0 andregistering it on the \s-1MMP\s0 site..SpD. \s-1INSTALL\s0.SpIf you are using cpan-mac, just drop the folder on the\&\fBinstallme\fR droplet, and use the module..Sp\&\fBOr\fR, if you aren't using cpan-mac, do some manual labor..SpMake sure the newlines for the modules are in Mac format, not Unix format.If they are not then you might have decompressed them incorrectly. Checkyour decompression and unpacking utilities settings to make sure they aretranslating text files properly..SpAs a last resort, you can use the perl one-liner:.Sp.Vb 1\& perl \-i.bak \-pe \*(Aqs/(?:\e015)?\e012/\e015/g\*(Aq <filenames>.Ve.Spon the source files..SpThen move the files (probably just the \fI.pm\fR files, though theremay be some additional ones, too; check the module documentation)to their final destination: This willmost likely be in \f(CW\*(C`$ENV{MACPERL}site_lib:\*(C'\fR (i.e.,\&\f(CW\*(C`HD:MacPerl folder:site_lib:\*(C'\fR). You can add new paths tothe default \f(CW@INC\fR in the Preferences menu item in theMacPerl application (\f(CW\*(C`$ENV{MACPERL}site_lib:\*(C'\fR is addedautomagically). Create whatever directory structures are required(i.e., for \f(CW\*(C`Some::Module\*(C'\fR, create\&\f(CW\*(C`$ENV{MACPERL}site_lib:Some:\*(C'\fR and put\&\f(CW\*(C`Module.pm\*(C'\fR in that directory)..SpThen run the following script (or something like it):.Sp.Vb 4\& #!perl \-w\& use AutoSplit;\& my $dir = "${MACPERL}site_perl";\& autosplit("$dir:Some:Module.pm", "$dir:auto", 0, 1, 1);.Ve.IP "\(bu" 4\&\fBIf you're on the \s-1DJGPP\s0 port of \s-1DOS\s0,\fR.Sp.Vb 1\& A. DECOMPRESS.Ve.Spdjtarx ( ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2/ )will both uncompress and unpack..Sp.Vb 1\& B. UNPACK.Ve.SpSee above..Sp.Vb 1\& C. BUILD.Ve.SpGo into the newly-created directory and type:.Sp.Vb 2\& perl Makefile.PL\& make test.Ve.SpYou will need the packages mentioned in \fI\s-1README\s0.dos\fRin the Perl distribution..Sp.Vb 1\& D. INSTALL.Ve.SpWhile still in that directory, type:.Sp.Vb 1\& make install.Ve.SpYou will need the packages mentioned in \fI\s-1README\s0.dos\fR in the Perl distribution..IP "\(bu" 4\&\fBIf you're on \s-1OS/2\s0,\fR.SpGet the \s-1EMX\s0 development suite and gzip/tar, from either Hobbes (http://hobbes.nmsu.edu ) or Leo ( http://www.leo.org ), and then followthe instructions for Unix..IP "\(bu" 4\&\fBIf you're on \s-1VMS\s0,\fR.SpWhen downloading from \s-1CPAN\s0, save your file with a \f(CW\*(C`.tgz\*(C'\fRextension instead of \f(CW\*(C`.tar.gz\*(C'\fR. All other periods in thefilename should be replaced with underscores. For example,\&\f(CW\*(C`Your\-Module\-1.33.tar.gz\*(C'\fR should be downloaded as\&\f(CW\*(C`Your\-Module\-1_33.tgz\*(C'\fR..SpA. \s-1DECOMPRESS\s0.SpType.Sp.Vb 1\& gzip \-d Your\-Module.tgz.Ve.Spor, for zipped modules, type.Sp.Vb 1\& unzip Your\-Module.zip.Ve.SpExecutables for gzip, zip, and VMStar:.Sp.Vb 2\& http://www.openvms.digital.com/freeware/\& http://www.crinoid.com/utils/.Ve.Spand their source code:.Sp.Vb 1\& http://www.fsf.org/order/ftp.html.Ve.SpNote that \s-1GNU\s0's gzip/gunzip is not the same as Info-ZIP's zip/unzippackage. The former is a simple compression tool; the latter permitscreation of multi-file archives..SpB. \s-1UNPACK\s0.SpIf you're using VMStar:.Sp.Vb 1\& VMStar xf Your\-Module.tar.Ve.SpOr, if you're fond of \s-1VMS\s0 command syntax:.Sp.Vb 1\& tar/extract/verbose Your_Module.tar.Ve.SpC. \s-1BUILD\s0.SpMake sure you have \s-1MMS\s0 (from Digital) or the freeware \s-1MMK\s0 ( availablefrom MadGoat at http://www.madgoat.com ). Then type this to createthe \s-1DESCRIP\s0.MMS for the module:.Sp.Vb 1\& perl Makefile.PL.Ve.SpNow you're ready to build:.Sp.Vb 1\& mms test.Ve.SpSubstitute \f(CW\*(C`mmk\*(C'\fR for \f(CW\*(C`mms\*(C'\fR above if you're using \s-1MMK\s0..SpD. \s-1INSTALL\s0.SpType.Sp.Vb 1\& mms install.Ve.SpSubstitute \f(CW\*(C`mmk\*(C'\fR for \f(CW\*(C`mms\*(C'\fR above if you're using \s-1MMK\s0..IP "\(bu" 4\&\fBIf you're on \s-1MVS\s0\fR,.SpIntroduce the \fI.tar.gz\fR file into an \s-1HFS\s0 as binary; don't translate from\&\s-1ASCII\s0 to \s-1EBCDIC\s0..SpA. \s-1DECOMPRESS\s0.SpDecompress the file with \f(CW\*(C`gzip \-d yourmodule.tar.gz\*(C'\fR.SpYou can get gzip fromhttp://www.s390.ibm.com/products/oe/bpxqp1.html.SpB. \s-1UNPACK\s0.SpUnpack the result with.Sp.Vb 1\& pax \-o to=IBM\-1047,from=ISO8859\-1 \-r < yourmodule.tar.Ve.SpThe \s-1BUILD\s0 and \s-1INSTALL\s0 steps are identical to those for Unix. Somemodules generate Makefiles that work better with \s-1GNU\s0 make, which isavailable from http://www.mks.com/s390/gnu/.SH "PORTABILITY".IX Header "PORTABILITY"Note that not all modules will work with on all platforms.See perlport for more information on portability issues.Read the documentation to see if the module will work on yoursystem. There are basically three categoriesof modules that will not work \*(L"out of the box\*(R" with allplatforms (with some possibility of overlap):.IP "\(bu" 4\&\fBThose that should, but don't.\fR These need to be fixed; considercontacting the author and possibly writing a patch..IP "\(bu" 4\&\fBThose that need to be compiled, where the target platformdoesn't have compilers readily available.\fR (These modules contain\&\fI.xs\fR or \fI.c\fR files, usually.) You might be able to findexisting binaries on the \s-1CPAN\s0 or elsewhere, or you mightwant to try getting compilers and building it yourself, and thenrelease the binary for other poor souls to use..IP "\(bu" 4\&\fBThose that are targeted at a specific platform.\fR(Such as the Win32:: modules.) If the module is targetedspecifically at a platform other than yours, you're outof luck, most likely..PPCheck the \s-1CPAN\s0 Testers if a module should work with your platformbut it doesn't behave as you'd expect, or you aren't sure whether ornot a module will work under your platform. If the module you wantisn't listed there, you can test it yourself and let \s-1CPAN\s0 Testers know,you can join \s-1CPAN\s0 Testers, or you can request it be tested..PP.Vb 1\& http://testers.cpan.org/.Ve.SH "HEY".IX Header "HEY"If you have any suggested changes for this page, let me know. Pleasedon't send me mail asking for help on how to install your modules.There are too many modules, and too few Orwants, for me to be able toanswer or even acknowledge all your questions. Contact the moduleauthor instead, or post to comp.lang.perl.modules, or ask someonefamiliar with Perl on your operating system..SH "AUTHOR".IX Header "AUTHOR"Jon Orwant.PPorwant@medita.mit.edu.PPwith invaluable help from Chris Nandor, and valuable help from BrandonAllbery, Charles Bailey, Graham Barr, Dominic Dunlop, JarkkoHietaniemi, Ben Holzman, Tom Horsley, Nick Ing-Simmons, TuomasJ. Lukka, Laszlo Molnar, Alan Olsen, Peter Prymmer, Gurusamy Sarathy,Christoph Spalinger, Dan Sugalski, Larry Virden, and Ilya Zakharevich..PPFirst version July 22, 1998; last revised November 21, 2001..SH "COPYRIGHT".IX Header "COPYRIGHT"Copyright (C) 1998, 2002, 2003 Jon Orwant. All Rights Reserved..PPPermission is granted to make and distribute verbatim copies of thisdocumentation provided the copyright notice and this permission notice arepreserved on all copies..PPPermission is granted to copy and distribute modified versions of thisdocumentation under the conditions for verbatim copying, provided alsothat they are marked clearly as modified versions, that the authors'names and title are unchanged (though subtitles and additionalauthors' names may be added), and that the entire resulting derivedwork is distributed under the terms of a permission notice identicalto this one..PPPermission is granted to copy and distribute translations of thisdocumentation into another language, under the above conditions formodified versions.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -