How to look inside every CPAN distributionby xdg (Monsignor)
|on Dec 12, 2008 at 21:15 UTC||Need Help??|
Ever wonder how many CPAN distributions use Module::Build, or Module::Install? Or how common the different ways Changes, ChangeLog, Changelog, etc. show up in a distribution? Or how many distributions use a particular expression in code?
It provides a command line tool that unpacks each distribution tarball in a CPAN::Mini repository, visits the resulting directory, and executes another program. For example, listing all distributions that contain Build.PL:
Clearly, if I were running frequent analyses, I might just use CPAN::Mini::Extract and keep all the tarballs extracted, but since I only occasionally have questions like this, I'm willing to make the space/time tradeoff.
Oh, and to answer that first question, here's how many distributions use each style of installer:
Looks like Module::Install has almost caught up to Module::Build. Impressive!
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.