App-cpanminus-1.7001 > App::cpanminus
App-cpanminus-1.7001

名前

App::cpanminus - get, unpack, build and install modules from CPAN

App::cpanminus - CPANからモジュールを取り、アンパックし、ビルドして、インストールする

概要

    cpanm Module

Run cpanm -h or perldoc cpanm for more options.

cpanm -h か、perldoc cpanmでより多くのオプションが見れます。

説明

cpanminus is a script to get, unpack, build and install modules from CPAN and does nothing else.

cpanminusはCPANからモジュールを取り、アンパックし、ビルドして、インストールするスクリプトで、 他のことは何もしません。

It's dependency free (can bootstrap itself), requires zero configuration, and stands alone. When running, it requires only 10MB of RAM.

cpanmは依存がありません(それ自身で動かせます)。設定も不要で、スタンドアローンです。 実行時に10MBのRAMしか必要としません。

インストール

There are several ways to install cpanminus to your system.

cpanminusをシステムにインストールする方法はいくつかあります。

パッケージ管理システム

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 cpanm to your system without thinking about where to install, and later upgrade.

Debian パッケージや、RPM、FreeBSDのportsや他のOS利用可能なパッケージがあります。 パッケージ管理システムを使いたければ、cpanminus を探して、適したコマンドを使って インストールしてください。どこにインストールするかや、後のアップグレードのこと 考えずに、簡単にcpanmをインストールできます。

システムperlへのインストール

You can also use the latest cpanminus to install cpanminus itself:

cpaminus自身を使って、最新のcpanminusをインストールすることもできます。

    curl -L http://cpanmin.us | perl - --sudo App::cpanminus

This will install cpanm to your bin directory like /usr/local/bin (unless you configured INSTALL_BASE with local::lib), so you probably need the --sudo option.

cpanm/usr/local/bin(local::libINSTALL_BASEを設定していないかぎり) bin ディレクトリにインストールされます。そのため、 --sudoオプションがおそらく必要でしょう。

localのperl(perlbrew)にインストール

If you have perl in your home directory, which is the case if you use tools like perlbrew, you don't need the --sudo option, since you're most likely to have a write permission to the perl's library path. You can just do:

ホームディレクトリにperlがあるなら、perlbrewのようなツールを使っているような ケースですが、--sudoオプションは必要ありません。そのような場合は、普通 perlのライブラリパスへの書き込み権限があるためです。ただ、次のようにします:

    curl -L http://cpanmin.us | perl - App::cpanminus

to install the cpanm executable to the perl's bin path, like ~/perl5/perlbrew/bin/cpanm.

実行可能なcpanmをperlのbinパスにインストールされます。 ~/perl5/perlbrew/bin/cpanmのようなパスになります。

スタンドアロンの実行可能ファイルをダウンロードする

You can also copy the standalone executable to whatever location you'd like.

好きな場所に、スタンドアロン実行可能ファイルをコピーすることもできます。

    cd ~/bin
    curl -LO http://xrl.us/cpanm
    chmod +x cpanm
    # edit shebang if you don't have /usr/bin/env

This just works, but be sure to grab the new version manually when you upgrade because --self-upgrade might not work for this.

正しく動きますが、アップグレードする際には新しいバージョンを自分で取ってくることに 気をつけてください。こうすると、--self-upgradeはうまく動きません。

依存

perl 5.8 or later.

perl 5.8 以降。

  • 'tar' executable (bsdtar or GNU tar version 1.22 are recommended) or Archive::Tar to unpack files.

    ファイルのアンパックに、'tar' 実行ファイル (bsdtar か GNU tar version 1.22 推奨) か、Archive::Tar。

  • C compiler, if you want to build XS modules.

    XSモジュールをビルドしたければ、C コンパイラ。

  • make

  • Module::Build (core in 5.10)

質問

他の CPAN インストーラ?

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.

OK。最初の動機は次のものです: CPANシェルは、Slicehost/linodeのもっともお手頃な価格の、256MB RAMしかないプランでは、メモリを使い尽くす(か、ひどくスワップして、本当に遅い)。 CPANからperlモジュールをインストールするために、より多く払うべき? そうは思いません。

ですが、なぜ新しいクライアント?

First of all, let me be clear that CPAN and CPANPLUS are great tools I've used for literally 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.

まず最初に、CPANとCPANPLUSが偉大なツールであることは明白です。 文字通り何年も使ってきました(CPANに私のモジュールがあるか知っていますよね?) 本当に、それらのCPANツールチェインエコシステムの最も重要なツールの メンテナンスの努力に敬意を持っています。

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.

ですが、経験が少ないユーザー(ほとんどがPerlコミュニティの外側からの)、 または、本当に経験のある、自分で自分の足を撃つ方法をしているPerl開発者でも、 CPANツールチェインをセットアップするのは、ヤックシェービングのように感じることもよくあります。 やりたいことの全てが、いくつかのモジュールをインストールして、コードを書き始める ことだけのような時は特にです。

設定なし? このモジュールは、CPAN インデックスをどのように取得/解析/更新するのですか?

It queries the CPAN Meta DB site at http://cpanmetadb.plackperl.org/. 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 http://metacpan.org/ using its wonderful API.

http://cpanmetadb.plackperl.org/のCPAN Meta DB サイトに問い合わせます。 このサイトは少なくとも、毎時間、速い同期ミラーから最新の変更を反映しています。 このスクリプトはまた、フォールバックに、http://metacpan.orgの素敵なAPI を使って、モジュールを問い合わせます。

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 --no-report-perl-version option. Read more about the option with cpanm, and read more about the privacy policy about this data collection at http://cpanmetadb.plackperl.org/#privacy

これらのAPIホストを問い合わせる際に、cpam(1.6004以降)は、 ローカルの perl バージョンをデフォルトでユーザーエージェントの文字列に入れて、 サーバに送っています。--no-report-perl-versionオプションを使うことで、 これを無効にできます。詳しくはcpanmのオプションについて読んでください。 また、データ収集に関するプライバシーポリシーについては、http://cpanmetadb.plackperl.org/#privacy を読んでください。

Fetched files are unpacked in ~/.cpanm and automatically cleaned up periodically. You can configure the location of this with the PERL_CPANM_HOME environment variable.

取得されたファイルが~/.cpanmにアンパックされると、自動的に、定期的に 掃除されます。PERL_CPANM_HOME環境変数で、その場所を変更できます。

モジュールをどこにインストールされますか? root 権限は必要ですか?

It installs to wherever ExtUtils::MakeMaker and Module::Build are configured to (via PERL_MM_OPT and PERL_MB_OPT). 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.

ExtUtils::MakeMakerとModule::Buildが設定されているところ(PERL_MM_OPTPERL_MB_OPT経由で)にどこでもインストールします。そのため、 local::lib を使っているのなら、ローカルのperl5ディレクトリにインストールします。 そうでなければ、使っている perl が属する site_perl ディレクトリにインストール されます。

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 perl5 directory under your home directory. To avoid this, run the script as the root user, with --sudo option or with --local-lib option.

cpanminusは、起動時に、local::libを設定しているかか、site_perlディレクトリへの モジュールをインストールする権限を持っているかをチェックします。 もし、なければ、自動的に local::lib と互換性のあるインストールパス、 ホームディレクトリの下のperl5ディレクトリをセットアップします。 これを避けるには、rootユーザーとして、実行するか、--sudoオプションか、 --local-libオプションと一緒に実行してください。

cpanminus が XYZ モジュールをインストールできません。バグですか?

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:

その場合、ディストリビューション自身の問題であることが、もっともありがちです。 cpanminus は、以下のようなディストリビューションの問題をサポートしませんが、 知っています:

  • Tests that require input from STDIN.

    STDINからの入力が必要なテスト

  • Tests that might fail when AUTOMATED_TESTING is enabled.

    AUTOMATED_TESTINGが有効なとき、テストが失敗する。

  • Modules that have invalid numeric values as VERSION (such as 1.1a)

    モジュールが、バージョン番号として不正な数値であるとき(1.1aのような)

These failures can be reported back to the author of the module so that they can fix it accordingly, rather than me.

このような失敗については、モジュールの作者にレポートしてください。 そうすれば、それにしたがって、直すことができるでしょう。私にではなく。

Does cpanm support the feature XYZ of CPAN and CPANPLUS?

(cpanm) CPANCPANPLUSのXYZ機能はサポートしますか?

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 minus, right?

たいていの場合しません。cpanm自身ではしないことがいくつかあります。 そして、それは特徴です。- 名前のminusからわかりますよね?

If you need these features, use CPAN, CPANPLUS or the standalone tools that are mentioned.

もし、それらの機能が必要なら、CPANCPANPLUSか言及されている 他のツールを使ってください。

  • CPAN testers reporting. See App::cpanminus::reporter

  • Building RPM packages from CPAN modules

  • Listing the outdated modules that needs upgrading. See App::cpanoutdated

  • Showing the changes of the modules you're about to upgrade. See cpan-listchanges

  • Patching CPAN modules with distroprefs.

See cpanm or cpanm -h to see what cpanminus can do :)

コピーライト

Copyright 2010- Tatsuhiko Miyagawa

The standalone executable contains the following modules embedded.

CPAN::DistnameInfo Copyright 2003 Graham Barr
Parse::CPAN::Meta Copyright 2006-2009 Adam Kennedy
local::lib Copyright 2007-2009 Matt S Trout
HTTP::Tiny Copyright 2011 Christian Hansen
Module::Metadata Copyright 2001-2006 Ken Williams. 2010 Matt S Trout
version Copyright 2004-2010 John Peacock
JSON::PP Copyright 2007-2011 by Makamaka Hannyaharamitu
CPAN::Meta, CPAN::Meta::Requirements Copyright (c) 2010 by David Golden and Ricardo Signes
CPAN::Meta::YAML Copyright 2010 Adam Kennedy
File::pushd Copyright 2012 David Golden

ライセンス

This software is licensed under the same terms as Perl.

CREDITS

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.

謝辞

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.

COMMUNITY

http://github.com/miyagawa/cpanminus - source code repository, issue tracker
irc://irc.perl.org/#toolchain - discussions about Perl toolchain. I'm there.

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.

SEE ALSO

CPAN CPANPLUS pip