=encoding utf8 =head1 NAME =begin original App::cpanminus - get, unpack, build and install modules from CPAN =end original App::cpanminus - CPANからモジュールを取り、アンパックし、ビルドして、インストールする =head1 SYNOPSIS cpanm Module =begin original Run C or C for more options. =end original C か、Cでより多くのオプションが見れます。 =head1 DESCRIPTION =begin original cpanminus is a script to get, unpack, build and install modules from CPAN and does nothing else. =end original cpanminusはCPANからモジュールを取り、アンパックし、ビルドして、インストールするスクリプトで、 他のことは何もしません。 =begin original It's dependency free (can bootstrap itself), requires zero configuration, and stands alone. When running, it requires only 10MB of RAM. =end original cpanmは依存がありません(それ自身で動かせます)。設定も不要で、スタンドアローンです。 実行時に10MBのRAMしか必要としません。 =head1 INSTALLATION (インストール) =begin original There are several ways to install cpanminus to your system. =end original cpanminusをシステムにインストールする方法はいくつかあります。 =head2 Package management system (パッケージ管理システム) =begin original There are Debian packages, RPMs, FreeBSD ports, and packages for other operation systems available. If you want to use the package management system, search for cpanminus and use the appropriate command to install. This makes it easy to install C to your system without thinking about where to install, and later upgrade. =end original Debian パッケージや、RPM、FreeBSDのportsや他のOS利用可能なパッケージがあります。 パッケージ管理システムを使いたければ、cpanminus を探して、適したコマンドを使って インストールしてください。どこにインストールするかや、後のアップグレードのこと 考えずに、簡単にCをインストールできます。 =head2 Installing to system perl (システムperlへのインストール) =begin original You can also use the latest cpanminus to install cpanminus itself: =end original cpaminus自身を使って、最新のcpanminusをインストールすることもできます。 curl -L http://cpanmin.us | perl - --sudo App::cpanminus =begin original This will install C to your bin directory like C (unless you configured C with L), so you probably need the C<--sudo> option. =end original Cが C(LでCを設定していないかぎり) bin ディレクトリにインストールされます。そのため、 C<--sudo>オプションがおそらく必要でしょう。 =head2 Installing to local perl (perlbrew) (localのperl(perlbrew)にインストール) =begin original If you have perl in your home directory, which is the case if you use tools like L, you don't need the C<--sudo> option, since you're most likely to have a write permission to the perl's library path. You can just do: =end original ホームディレクトリにperlがあるなら、Lのようなツールを使っているような ケースですが、C<--sudo>オプションは必要ありません。そのような場合は、普通 perlのライブラリパスへの書き込み権限があるためです。ただ、次のようにします: curl -L http://cpanmin.us | perl - App::cpanminus =begin original to install the C executable to the perl's bin path, like C<~/perl5/perlbrew/bin/cpanm>. =end original 実行可能なCをperlのbinパスにインストールされます。 C<~/perl5/perlbrew/bin/cpanm>のようなパスになります。 =head2 Downloading the standalone executable (スタンドアロンの実行可能ファイルをダウンロードする) =begin original You can also copy the standalone executable to whatever location you'd like. =end original 好きな場所に、スタンドアロン実行可能ファイルをコピーすることもできます。 cd ~/bin curl -LO http://xrl.us/cpanm chmod +x cpanm # edit shebang if you don't have /usr/bin/env =begin original This just works, but be sure to grab the new version manually when you upgrade because C<--self-upgrade> might not work for this. =end original 正しく動きますが、アップグレードする際には新しいバージョンを自分で取ってくることに 気をつけてください。こうすると、C<--self-upgrade>はうまく動きません。 =head1 DEPENDENCIES (依存) =begin original perl 5.8 or later. =end original perl 5.8 以降。 =over 4 =item * =begin original 'tar' executable (bsdtar or GNU tar version 1.22 are recommended) or Archive::Tar to unpack files. =end original ファイルのアンパックに、'tar' 実行ファイル (bsdtar か GNU tar version 1.22 推奨) か、Archive::Tar。 =item * =begin original C compiler, if you want to build XS modules. =end original XSモジュールをビルドしたければ、C コンパイラ。 =item * make =item * Module::Build (core in 5.10) =back =head1 QUESTIONS (質問) =head2 Another CPAN installer? (他の CPAN インストーラ?) =begin original OK, the first motivation was this: the CPAN shell runs out of memory (or swaps heavily and gets really slow) on Slicehost/linode's most affordable plan with only 256MB RAM. Should I pay more to install perl modules from CPAN? I don't think so. =end original OK。最初の動機は次のものです: CPANシェルは、Slicehost/linodeのもっともお手頃な価格の、256MB RAMしかないプランでは、メモリを使い尽くす(か、ひどくスワップして、本当に遅い)。 CPANからperlモジュールをインストールするために、より多く払うべき? そうは思いません。 =head2 But why a new client? (ですが、なぜ新しいクライアント?) =begin original First of all, let me be clear that CPAN and CPANPLUS are great tools I've used for I years (you know how many modules I have on CPAN, right?). I really respect their efforts of maintaining the most important tools in the CPAN toolchain ecosystem. =end original まず最初に、CPANとCPANPLUSが偉大なツールであることは明白です。 I<文字通り>何年も使ってきました(CPANに私のモジュールがあるか知っていますよね?) 本当に、それらのCPANツールチェインエコシステムの最も重要なツールの メンテナンスの努力に敬意を持っています。 =begin original However, for less experienced users (mostly from outside the Perl community), or even really experienced Perl developers who know how to shoot themselves in their feet, setting up the CPAN toolchain often feels like yak shaving, especially when all they want to do is just install some modules and start writing code. =end original ですが、経験が少ないユーザー(ほとんどがPerlコミュニティの外側からの)、 または、本当に経験のある、自分で自分の足を撃つ方法をしているPerl開発者でも、 CPANツールチェインをセットアップするのは、ヤックシェービングのように感じることもよくあります。 やりたいことの全てが、いくつかのモジュールをインストールして、コードを書き始める ことだけのような時は特にです。 =head2 Zero-conf? How does this module get/parse/update the CPAN index? (設定なし? このモジュールは、CPAN インデックスをどのように取得/解析/更新するのですか?) =begin original It queries the CPAN Meta DB site at L. The site is updated at least every hour to reflect the latest changes from fast syncing mirrors. The script then also falls back to query the module at L using its wonderful API. =end original LのCPAN Meta DB サイトに問い合わせます。 このサイトは少なくとも、毎時間、速い同期ミラーから最新の変更を反映しています。 このスクリプトはまた、フォールバックに、Lの素敵なAPI を使って、モジュールを問い合わせます。 =begin original Upon calling these API hosts, cpanm (1.6004 or later) will send the local perl versions to the server in User-Agent string by default. You can turn it off with C<--no-report-perl-version> option. Read more about the option with L, and read more about the privacy policy about this data collection at L =end original これらのAPIホストを問い合わせる際に、cpam(1.6004以降)は、 ローカルの perl バージョンをデフォルトでユーザーエージェントの文字列に入れて、 サーバに送っています。C<--no-report-perl-version>オプションを使うことで、 これを無効にできます。詳しくはLのオプションについて読んでください。 また、データ収集に関するプライバシーポリシーについては、L を読んでください。 =begin original Fetched files are unpacked in C<~/.cpanm> and automatically cleaned up periodically. You can configure the location of this with the C environment variable. =end original 取得されたファイルがC<~/.cpanm>にアンパックされると、自動的に、定期的に 掃除されます。C環境変数で、その場所を変更できます。 =head2 Where does this install modules to? Do I need root access? (モジュールをどこにインストールされますか? root 権限は必要ですか?) =begin original It installs to wherever ExtUtils::MakeMaker and Module::Build are configured to (via C and C). So if you're using local::lib, then it installs to your local perl5 directory. Otherwise it installs to the site_perl directory that belongs to your perl. =end original ExtUtils::MakeMakerとModule::Buildが設定されているところ(Cと C経由で)にどこでもインストールします。そのため、 local::lib を使っているのなら、ローカルのperl5ディレクトリにインストールします。 そうでなければ、使っている perl が属する site_perl ディレクトリにインストール されます。 =begin original cpanminus at a boot time checks whether you have configured local::lib, or have the permission to install modules to the site_perl directory. If neither, it automatically sets up local::lib compatible installation path in a C directory under your home directory. To avoid this, run the script as the root user, with C<--sudo> option or with C<--local-lib> option. =end original cpanminusは、起動時に、local::libを設定しているかか、site_perlディレクトリへの モジュールをインストールする権限を持っているかをチェックします。 もし、なければ、自動的に local::lib と互換性のあるインストールパス、 ホームディレクトリの下のCディレクトリをセットアップします。 これを避けるには、rootユーザーとして、実行するか、C<--sudo>オプションか、 C<--local-lib>オプションと一緒に実行してください。 =head2 cpanminus can't install the module XYZ. Is it a bug? (cpanminus が XYZ モジュールをインストールできません。バグですか?) =begin original It is more likely a problem with the distribution itself. cpanminus doesn't support or is known to have issues with distributions like as follows: =end original その場合、ディストリビューション自身の問題であることが、もっともありがちです。 cpanminus は、以下のようなディストリビューションの問題をサポートしませんが、 知っています: =over 4 =item * =begin original Tests that require input from STDIN. =end original STDINからの入力が必要なテスト =item * =begin original Tests that might fail when C is enabled. =end original Cが有効なとき、テストが失敗する。 =item * =begin original Modules that have invalid numeric values as VERSION (such as C<1.1a>) =end original モジュールが、バージョン番号として不正な数値であるとき(C<1.1a>のような) =back =begin original These failures can be reported back to the author of the module so that they can fix it accordingly, rather than me. =end original このような失敗については、モジュールの作者にレポートしてください。 そうすれば、それにしたがって、直すことができるでしょう。私にではなく。 =head2 Does cpanm support the feature XYZ of L and L? (cpanm) LやLのXYZ機能はサポートしますか? =begin original Most likely not. Here are the things that cpanm doesn't do by itself. And it's a feature - you got that from the name I, right? =end original たいていの場合しません。cpanm自身ではしないことがいくつかあります。 そして、それは特徴です。- 名前のIからわかりますよね? =begin original If you need these features, use L, L or the standalone tools that are mentioned. =end original もし、それらの機能が必要なら、LやLか言及されている 他のツールを使ってください。 =over 4 =item * CPAN testers reporting. See L =item * Building RPM packages from CPAN modules =item * Listing the outdated modules that needs upgrading. See L =item * Showing the changes of the modules you're about to upgrade. See L =item * Patching CPAN modules with distroprefs. =back See L or C to see what cpanminus I do :) =head1 COPYRIGHT Copyright 2010- Tatsuhiko Miyagawa The standalone executable contains the following modules embedded. =over 4 =item L Copyright 2003 Graham Barr =item L Copyright 2006-2009 Adam Kennedy =item L Copyright 2007-2009 Matt S Trout =item L Copyright 2011 Christian Hansen =item L Copyright 2001-2006 Ken Williams. 2010 Matt S Trout =item L Copyright 2004-2010 John Peacock =item L Copyright 2007-2011 by Makamaka Hannyaharamitu =item L, L Copyright (c) 2010 by David Golden and Ricardo Signes =item L Copyright 2010 Adam Kennedy =item L Copyright 2012 David Golden =back =head1 LICENSE This software is licensed under the same terms as Perl. =head1 CREDITS =head2 CONTRIBUTORS Patches and code improvements were contributed by: Goro Fuji, Kazuhiro Osawa, Tokuhiro Matsuno, Kenichi Ishigaki, Ian Wells, Pedro Melo, Masayoshi Sekimura, Matt S Trout (mst), squeeky, horus and Ingy dot Net. =head2 ACKNOWLEDGEMENTS Bug reports, suggestions and feedbacks were sent by, or general acknowledgement goes to: Jesse Vincent, David Golden, Andreas Koenig, Jos Boumans, Chris Williams, Adam Kennedy, Audrey Tang, J. Shirley, Chris Prather, Jesse Luehrs, Marcus Ramberg, Shawn M Moore, chocolateboy, Chirs Nehren, Jonathan Rockway, Leon Brocard, Simon Elliott, Ricardo Signes, AEvar Arnfjord Bjarmason, Eric Wilhelm, Florian Ragwitz and xaicron. =head1 COMMUNITY =over 4 =item L - source code repository, issue tracker =item L - discussions about Perl toolchain. I'm there. =back =head1 NO WARRANTY This software is provided "as-is," without any express or implied warranty. In no event shall the author be held liable for any damages arising from the use of the software. =head1 SEE ALSO L L L =cut