At the German Perl Workshop this year I got started thinking about it with Jos, Nicholas and Thomas. Metadata is very useful. Metrics are useful. Kwalitee (note that it's not quality) is useful. So I thought for a little bit. I wrote a quick scripts to unpack all the modules on CPAN, and a couple of scripts to go through these modules. And decided the best place for metadata about CPAN would be, errr, on CPAN. And it got a little more complicated. Then Richard helped. And I ended up with Module::CPANTS.
For example, this is what Module::CPANTS knows about Acme::Colour:
'Acme-Colour-0.20.tar.gz' => {
'author' => 'LBROCARD',
'description' => 'additive and subtractive human-readable colours',
'files' => [
'Makefile.PL',
'README',
'MANIFEST'
],
'lines' => {
'nonpod' => 170,
'pod' => 95,
'total' => 265
},
'requires' => [
'Graphics-ColorNames-0.32.tar.gz',
'Scalar-List-Utils-1.11.tar.gz',
'Test-Simple-0.47.tar.gz'
],
'requires_module' => {
'Graphics::ColorNames' => 0,
'List::Util' => 0,
'Test::Simple' => 0
},
'requires_recursive' => [
'File-Spec-0.82.tar.gz',
'Graphics-ColorNames-0.32.tar.gz',
'Scalar-List-Utils-1.11.tar.gz',
'Test-Harness-2.26.tar.gz',
'Test-Simple-0.47.tar.gz'
],
'testers' => {
'fail' => 1,
'pass' => 5
}
};
Note that it gets the description, even though the module isn't in the modules list (only a quarter of the distributions on CPAN are), lines of code metrics, prerequisites (and recursive prerequisites), CPAN testers data, and a list of notable files. A whole bunch of metadata.
Before you start complaining: it's just the beginning. Module::CPANTS will never do all that the CPANTS synopsis mentions. No, it doesn't have many metrics (I don't want to evaluate all the Perl code on CPAN, for one). And the interface is, well, a really big hash. Adding new metrics is easy (you may need a little disk space to test it
Is this interesting? I think so. There are a whole lot of extra metrics that could be added. And if we set up a secure sandbox of some sort so that it's safe to evaluate all that Perl code, a couple more metrics. What easy-to-calculate metrics influence what you think of a Perl module? Want to help out? Check out Module::CPANTS::Generator.
And no, it's not just a plan to create the largest module on CPAN...
metrics (Score:2, Interesting)
Schwern's synopsis [develooper.com] has so many good ideas in it. I think you are on to something starting out with something relatively simple and then moving forward with new stuff as it becomes useful.
I'd be intersted in a couple of metrics, some of which might be easy to calculate.
Re:metrics (Score:2)
The main problem is getting access to this data without doing a billion web lookups. For the testers information, I use the NNTP interface to the testers mailing list, whi
Re:metrics (Score:2)
Rather than pulling all the data every couple of days and putting it into a module, have you considered turning your Module::CPANTS::Generator module into the main module itself? Have it just pull the data on demand. No reason to go pull all the information from the "Meta" module each day if noone is ever going to use it.
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
Re:metrics (Score:2)
Want a Web Service? (Score:2)
Now, I just need to find someone to maintain it. Being emailed to acme for safe keeping.
Casey West