/ domm

I hack Perl for fun and
profit.

Follow me on twitter!
Atom Icom ... on Atom!
<<<<<<<<<<
19.11.2004: hanging around; import
09.11.2004: laser in my eyes
05.11.2004: Linux doesn't suck after all
04.11.2004: Books, Lego, Munich and stuff
27.10.2004: Munich
26.10.2004: CPANTS news
22.10.2004: Template::Plugin::KwikiFormat
15.10.2004: netznetz.net saved my day
10.10.2004: Appartment rearrangement and cooking
08.10.2004: CPANTS news

I just released a new version of Module::CPANTS::Generator. Should be on your favourite CPAN mirror soon.

It contains the following new metrics:

The last two are generated by parsing the source code with a Parse::RecDescent based parser (Module::ExtractUse). This might be buggy, so please inform me if something got parsed wrong.

There's also quite a bit of new metadata, mainly a list of all modules actually used by a dist (again gathered by parsing). This information isn't used currently, but I plan to compare this list with what's specified in PREREQ_PM (minus Module::CoreList, of course).

Some data (total Kwalitee available is 14) (SQLite db is available here: http://cpants.dev.zsi.at/):

sqlite> select kwalitee,count(kwalitee) as cnt from kwalitee group by kwalitee order by kwalitee;

kwalitee    cnt

----------  ----------

0           30

2           3

3           11

4           57

5           35

6           34

7           95

8           276

9           670

10          1609

11          2567

12          1780

13          747

14          21



+++++++++++++++++++++++++++



sqlite> select avg(kwalitee) from kwalitee;

avg(kwalitee)

--------------------

10.7424070573409



++++++++++++ +++++++++++++++



sqlite> select cpanid,name,average_kwalitee from authors where distcount>5 order by average_kwalitee desc limit 20;

cpanid      name                       average_kwalitee

----------  -------------------------  ----------------

BPOSTLE     Bruno Postle               13

STEPHANB    Stephan Buys               13

JCDUQUE     Julius C. Duque            12.9411764705882

AMBS        Alberto Manuel Brandao Si  12.9

IAN         Ian Langworth              12.7857142857143

BARBIE      Barbie                     12.75

FABPOT      Fabien Potencier           12.7272727272727

RMCFARLA    Ross McFarland             12.7142857142857

BMORROW     Ben Morrow                 12.7142857142857

RSAVAGE     Ron Savage                 12.68

RJBS        Ricardo SIGNES             12.5769230769231

SSCOTTO     Salvatore E. ScottoDiLuzi  12.5714285714286

COG         Jose' Alves de Castro      12.4615384615385

DAVECROSS   Dave Cross                 12.4375

JOUKE       Jouke Visser               12.4285714285714

NKH         Nadim Ibn Hamouda El Khem  12.4285714285714

JFITZ       James FitzGibbon           12.4

TSCH        Torsten Schoenfeld         12.3333333333333

CLOTHO      Clotho Advanced Media      12.3333333333333

FLORIAN     Florian Helmberger         12.3333333333333



+++++++++++++++++++++++++++



sqlite> select module,count(module) as cnt from uses group by module order by cnt desc limit 20;

module                cnt

--------------------  -------------------------

strict                7026

vars                  4542

Carp                  3226

Exporter              3052

warnings              2255

DynaLoader            751

constant              747

5.006                 731

Data::Dumper          631

AutoLoader            503

POSIX                 381

File::Spec            341

IO::File              337

File::Basename        336

5.004                 321

DBI                   309

Fcntl                 294

5.005                 284

Apache::Constants     274

Cwd                   269

Next steps:

Original: http://use.perl.org/~domm/journal/21254

Legacy comments

nicholas: use warnings; (orignal post)

use warnings as a metric is unfair if a module expects to work with 5.005 or earlier. Likewise, having use warnings without a require 5.006 (or later) in Makefile.PL is probably a sign of poor kwalitee.

domm: Re:use warnings; (orignal post)

Hmm, you're right.



So I guess I'll drop use warnings as a metric, and maybe add a combined use warnings && require 5.006 check.

brian_d_foy: Re:use warnings; (orignal post)

This might be too much to do for every package, but I think checking for emitted warnings during tests might be a good metric. It's not perfect either, though. Still, good work :)

brian_d_foy: Some oddities (orignal post)

It seems the "use strict" test doesn't work out right for Business::ISMN.



I'm curious how your system decides which modules to include: several of mine are missing, such as Chemistry::Elements, Apache::Htaccess, and Data::Constraint.



The "use warning" metric is a bit unfair. Not only does it not work with perl versions prior to 5.6, but some people don't want warnings on in production code lest a perl upgrade start dumping new warnings into logs files. Before disks got to be as big as they are today, one

domm: Re:Some oddities (orignal post)

It seems the "use strict" test doesn't work out right for Business::ISMN.

You're right. Business::ISMN contains two module files, but defines three namespaces, all of which use strict. The bug in CPANTS is that it expects the number of use stricts to be the same as the number of module files. Which is obviously wrong. I changed '==' to '

I'm curious how your system decides which modules to include: several of mine are missing, such as Chemistry::Elements, Apache::Htaccess, and Data::Constraint.

Hmm, str

runrig: Another possible metric? (orignal post)

I'm not sure exactly how to include it, but I think the CPAN ratings [perl.org] ought to be some sort of kwalitee indicator :-)

Comments (via disqus)

>>>>>>>>>>