依存している distribution をかき集める
ある module を指定して、その module が依存している distribution をかき集めるやつを書いた。
Carton::Snapshot などがこれをやっており、そこからその機能だけを抽出した格好である。 名前長すぎなので変えたい。
例
インストールすると prereq-dist-dump.pl という便利スクリプトが入るのでこれの例。
例えば Data::Section::Simple が依存している distribution 全部は、こんな感じ。
ちなみに、実行した local 環境での依存を表している (はずな) ので、例えば Encode を cpan から install していない場合は core の方に入るはず。
カレントディレクトリに cpanfile があれば、それの依存 distribution 一覧がでるので
> cat cpanfile requires 'Amon2'; requires 'Teng'; > prereq-dist-dump.pl prereq dists * Amon2-6.11 * Apache-LogFormat-Compiler-0.32 * B-Hooks-EndOfScope-0.14 * CGI-4.13 * CPAN-Meta-2.143240 * CPAN-Meta-Requirements-2.133 * Class-Accessor-0.34 * Class-Accessor-Chained-0.01 * Class-Accessor-Lite-0.06 ...
のようになる。