develooper Front page | perl.module-authors | Postings from June 2008

Re: New CPANTS metrics

Thread Previous | Thread Next
From:
David Golden
Date:
June 9, 2008 15:28
Subject:
Re: New CPANTS metrics
Message ID:
5d4beb40806091527n2f70fc1ndf0b7562b29d0061@mail.gmail.com
On Mon, Jun 9, 2008 at 4:32 PM, Gabor Szabo <szabgab@gmail.com> wrote:
> I am sending this to both the module-authors list so you can be
> aware of the new metrics and the perl-qa list as they might
> have a few words as well regarding kwalitee.

First, I have to say that I applaud and appreciate the effort that
goes into developing new Kwalitee metrics -- however, I think that
many ideas wind up less interesting or relevant than initially
thought.  I think that too many measures of little interest will lead
authors to ignore CPANTS rather than optimize against it.  That may be
a feature or a deficiency, depending on one's perspective.

Personally, I find that metrics of "inclusion" -- eg. in Debian -- are
somewhat interesting, not unlike being a prerequisite for other
modules.  However, beyond that initial fact, fine distinctions around
bugs/patches/etc. seem a bit too idiosyncratic.  And as someone
invested in development on Win32, I also see chromatic's point that
isn't a very portable metric, which would be a shame to see for Perl
'Kwalitee".  More useful might be a "redistributed" Kwalitee score,
that looks to see whether something is distributed as part of a
standard perl installation.  E.g. XML::Parser is now bundled with
Strawberry Perl and I think by ActiveState as well.

A challenge to such metrics is what "distributed by" means.  I recall
at Oslo someone was trying to get thousands of CPAN modules to build
as packages for FreeBSD so that CPAN modules all get managed through
the same package management system, not a parallel one via CPAN.pm.
Does that count as "distributed"?

I think the Test::NoWarnings measure is fundamentally misguided.  I
generally think any Kwalitee metric that mandates the use of
particular modules is misguided, so some criticisms I have relate to
that. For instance, if I decide to write and use
"Test::NoWarnings::Plus", that has all the features of
Test::NoWarnings, should my Kwalitee go down?  If I write my own
testing framework that doesn't use Test::More, what then?

And encouraging widespread use of a module may not be a good idea if
it problems in that module would cause many CPAN distributions to fail
tests.   That already happens with Test::More.  I don't want to add
more distributions to a critical toolchain.

Moreover, Test::NoWarnings doesn't actually check that code doesn't
issue warnings.  It just checks that code doesn't call 'warn' against
the default warnings handler.  E.g.

    use Test::More tests => 1;
    use Test::NoWarnings;
    print STDERR "This warning isn't caught by Test::NoWarnings\n";
    sub log_error {} # would normally do something interesting
    local $SIG{__WARN__} = sub { log_error(@_); print STDERR @_, "\n" };
    warn "This warning isn't caught either";

[As an aside, the Test::NoWarnings docs imply I shouldn't need a
Test::More plan, but apparently I do.]

So even if one thinks that Kwalitee implies not issuing warnings,
Test::NoWarnings isn't the right way to test for that.  I'm not sure
there is a good way.  Check for stuff on STDERR?  That too probably
has issues.

> There are two issues regarding the criticism:
> 1) I did not find any mention of any new metric that would be good.

When you propose new metrics and ask for comments, I don't think
you're likely to get new metrics proposed.  You probably should ask
for those in a separate thread.

> 2) True, it would be great if more of the module authors knew about
>     CPANTS and cared. I agree so how could we let them know about
>     it besides posting on use.perl.org and on this mailing list?
>     Maybe http://perlbuzz.com/ ? Any other ideas?

Have links to the relevant CPANTS pages added to the search.cpan.org
author and distribution pages.

Regards,
David

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About