Playing with Alias' new CPANDB
By Robin Smidsrød on Jul 3, 2009 | In Perl | 5 feedbacks »
This is a somewhat simple query that identifies CPAN authors that use modules from the Test namespace in their runtime phase, according to the data from CPANDB.
SELECT d.author, count(r.module) AS test_namespace_used_in_runtime_phase
FROM requires r JOIN distribution d ON r.distribution = d.distribution
WHERE r.module LIKE 'Test::%'
AND r.phase = 'runtime'
GROUP BY d.author
ORDER BY test_namespace_used_in_runtime_phase DESC
LIMIT 20
| d.author | test_namespace_used_in_runtime_phase |
|---|---|
| NUFFIN | 122 |
| BDFOY | 84 |
| LUSHE | 78 |
| ANDYA | 75 |
| LBROCARD | 67 |
| RJBS | 66 |
| MARKOV | 62 |
| MIYAGAWA | 54 |
| ISHIGAKI | 53 |
| PETDANCE | 46 |
| SIMONW | 45 |
| TOKUHIROM | 40 |
| MCMAHON | 39 |
| NKH | 36 |
| APOCAL | 35 |
| DAVEBAIRD | 34 |
| LEOCHARRE | 34 |
| KARMAN | 31 |
| SHLOMIF | 31 |
| BARBIE | 29 |
Some modules might actually require modules from the Test namespace in their runtime phase, but this many?
I would think that this is an indicator that some authors mark their test requirements in the wrong way (or CPANDB is wrong). Maybe some Makefile.PL cleanup should done?
5 comments
So perhaps add in a
r.distribution NOT LIKE '%Test'
SELECT d.author, count(r.module) AS test_namespace_used_in_runtime_phase
FROM requires r JOIN distribution d ON r.distribution = d.distribution
WHERE r.module LIKE 'Test::%'
AND r.phase = 'runtime'
AND r.distribution NOT LIKE 'Test%'
GROUP BY d.author
ORDER BY test_namespace_used_in_runtime_phase DESC
LIMIT 20
Results:
NUFFIN 119
LUSHE 78
ANDYA 72
RJBS 66
LBROCARD 65
BDFOY 62
MARKOV 62
MIYAGAWA 53
ISHIGAKI 48
SIMONW 45
TOKUHIROM 37
NKH 36
LEOCHARRE 34
DAVEBAIRD 32
KARMAN 31
MCMAHON 31
PETDANCE 28
SALVA 28
SMUELLER 26
AMBS 25
Not much difference in the report after this correction.
Leave a comment
| « Talk: Morality and Pragmatism in Free Software and Open Source | Deprecated code analyzer for perl » |
