NAME

perlmodinstall - CPAN モジュールのインストール

DESCRIPTION

You can think of a module as the fundamental unit of reusable Perl code; see perlmod for details. Whenever anyone creates a chunk of Perl code that they think will be useful to the world, they register as a Perl developer at http://www.cpan.org/modules/04pause.html so that they can then upload their code to the CPAN. CPAN は Comprehensive Perl Archive Network で、http://www.cpan.org/ で アクセスでき、http://search.cpan.org/ で検索できます。 (TBT)

この文書は CPAN モジュールをダウンロードして自身のコンピュータに インストールしたい人々のためのものです。

前書き

最初に、本当にそのモジュールは既にシステムにインストールされていないですか? perl -MFoo -e 1 を試してください。 ("Foo" をモジュール名に置き換えてください; 例えば perl -MCGI::Carp -e 1。)

エラーメッセージが出なければ、モジュールは入っています。 (エラーメッセージが出ても、モジュールが入っているけれども perl -e "print qq(@INC)" で表示されるパスにはない可能性はあります。) この文書の残りの部分では、絶対間違いなく確実にモジュールは インストールされていないけれども、CPAN にあるのを見つけた、と仮定します。

さて、ここに .tar.gz (あるいは稀ですが .zip) で終わるファイルがあります。 あなたは中に魅力的なモジュールが入っていることを知っています。 しなければならない四つのステップがあります:

ファイルを 伸長 する
ファイルをディレクトリに 展開 する
モジュールを ビルド する(不要な場合もあります)
モジュールを インストール する。

Here's how to perform each step for each operating system. This is <not> a substitute for reading the README and INSTALL files that might have come with your module! (TBT)

Also note that these instructions are tailored for installing the module into your system's repository of Perl modules -- but you can install modules into any directory you wish. For instance, where I say perl Makefile.PL, you can substitute perl Makefile.PL PREFIX=/my/perl_directory to install the modules into /my/perl_directory. Then you can use the modules from your Perl programs with use lib "/my/perl_directory/lib/site_perl"; or sometimes just use "/my/perl_directory";. If you're on a system that requires superuser/root access to install modules into the directories you see when you type perl -e "print qq(@INC)", you'll want to install them into a local directory (such as your home directory) and use this approach. (TBT)

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 your system. There are basically three categories of modules that will not work "out of the box" with all platforms (with some possibility of overlap): (TBT)

Check the CPAN Testers if a module should work with your platform but it doesn't behave as you'd expect, or you aren't sure whether or not a module will work under your platform. If the module you want isn't listed there, you can test it yourself and let CPAN Testers know, you can join CPAN Testers, or you can request it be tested. (TBT)

    http://testers.cpan.org/

HEY

If you have any suggested changes for this page, let me know. Please don'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 to answer or even acknowledge all your questions. Contact the module author instead, or post to comp.lang.perl.modules, or ask someone familiar with Perl on your operating system. (TBT)

AUTHOR

Jon Orwant

orwant@medita.mit.edu

with invaluable help from Chris Nandor, and valuable help from Brandon Allbery, Charles Bailey, Graham Barr, Dominic Dunlop, Jarkko Hietaniemi, Ben Holzman, Tom Horsley, Nick Ing-Simmons, Tuomas J. Lukka, Laszlo Molnar, Alan Olsen, Peter Prymmer, Gurusamy Sarathy, Christoph Spalinger, Dan Sugalski, Larry Virden, and Ilya Zakharevich. (TBT)

First version July 22, 1998; last revised November 21, 2001. (TBT)

COPYRIGHT

Copyright (C) 1998, 2002, 2003 Jon Orwant. All Rights Reserved.

Permission is granted to make and distribute verbatim copies of this documentation provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to copy and distribute modified versions of this documentation under the conditions for verbatim copying, provided also that they are marked clearly as modified versions, that the authors' names and title are unchanged (though subtitles and additional authors' names may be added), and that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this documentation into another language, under the above conditions for modified versions.