=encoding utf8 =head1 NAME =begin original Pod::Cpandoc - perldoc that works for modules you don't have installed =end original Pod::Cpandoc - インストールしていないモジュールでも機能する perldoc =head1 SYNOPSIS =begin original cpandoc File::Find -- shows the documentation of your installed File::Find cpandoc Acme::BadExample -- works even if you don't have Acme::BadExample installed! cpandoc -v '$?' -- passes everything through to regular perldoc cpandoc -m Acme::BadExample | grep system -- options are respected even if the module was scraped vim `cpandoc -l Web::Scraper` -- getting the idea yet? =end original cpandoc File::Find -- インストール済みの File::Find のドキュメントを表示 cpandoc Acme::BadExample -- Acme::BadExample をインストールしてなくても動くよ! cpandoc -v '$?' -- すべてが標準の perldoc に渡されます cpandoc -m Acme::BadExample | grep system -- スクレイピングしてきたモジュールにも(perldoc の)オプションは使えます vim `cpandoc -l Web::Scraper` -- もうわかるよね? =head1 DESCRIPTION =begin original C is a perl script that acts like C except that if it would have bailed out with C, it will instead scrape a CPAN index for the module's documentation. One important feature of C is that it I scrapes the live index if you do not have the module installed. So if you use C on a module you already have installed, then it will just read the already-installed documentation. This means that the version of the documentation matches up with the version of the code you have. As a fringe benefit, C will be fast for modules you've installed. :) All this means that you should be able to drop in C in place of C and have everything keep working. See L for how to do this. If you set the environment variable C to a true value, then we will print a message to STDERR telling you that C is going to make a request against the live CPAN index. =end original C は、インストールされてなくてモジュールのドキュメントが見つからないという場面で、かわりにCPAN をスクレイピングすることでうまく取り持ってくれるということをのぞいては、C と同じように振舞います。 Cの重要な機能は、インストールしていないモジュールをスクレイピングすることだけです。 すでにインストールしているモジュールに使えば、インストールされたドキュメントを読めます。 これは、ドキュメントのバージョンとコードのバージョンが一致することを意味します。 C はあなたがモジュールをインストールするのを早くするちょっといい効用があります。 C を C にすべて差し替えても無事動き続けます。 差し替え方は、以下の L を参照してください。 環境変数 C に正の値を設定すると、CPAN へのリクエストを STDERR にメッセージ出力します。 =head1 SNEAKY INSTALL =begin original cpanm Pod::Cpandoc then: alias perldoc=cpandoc or: function perldoc () { cpandoc "$@" } Now `perldoc Acme::BadExample` works! C should continue to work for everything that you're used to, since C passes all options through to it. C is merely a subclass that falls back to scraping a CPAN index when it fails to find your queried file in C<@INC>. =end original cpanm Pod::Cpandoc インストールしたら: alias perldoc=cpandoc もしくは: function perldoc () { cpandoc "$@" } これで `perldoc Acme::BadExample` が動くよ! C からオプションを渡される場合でも、C はすべてこれまでと同じように機能します。 C は C<@INC> からファイルがみつからないときに、CPAN にスクレイピングしにいくだけのサブクラスにすぎないのです。 =head1 SEE ALSO The sneaky install was inspired by L. L =head1 AUTHOR Shawn M Moore C =head1 COPYRIGHT Copyright 2011 Shawn M Moore. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut