On Oct 24, 2006, at 9:32 AM, David Golden wrote:

I think characterizing "the basics" as being based on Module::Starter
is a little too module-specific for starters.  Do you want to also
make sure that there are files other than the boilerplate created by
all the other module skeleton modules?  What if someone puts real
tests into a boilerplate file and doesn't rename it.  And how do you
plan to address test.pl?

Moreover, I'm loath to encourage too many (more) of the "file exists" tests.

 $ touch t/foo.t

"Wow, my distribution has more Kwalitee, now".

The examples metric is the same:

$ touch examples/not_really_an_example

That scores the extra point.  And so what?

I'd be much more interested in seeing effort put into things like
checking if detectable prerequisites are listed in the META.yml.

Regards,
David Golden

As I've said before, Kwalitee should focus on rewarding good authors and catching honest mistakes, while ignoring cheaters. If someone adds important tests to boilerplate.t, that's a bad practice worth noting. If someone games the system and creates an empty foo.t, I'm content to give them a Kwalitee point they don't deserve. Maybe we'll just create a Kwalitee test that detects any zero-length files and penalize that cheater later.

It seems easy and fairly harmless to do this:

  sub has_substantive_tests {
     return 1 if (-e 'test.pl');
     return 0 if (! -d 't');
     for my $file (File::Slurp::read_dir('t')) {
        next if ($file !~ /\.t$/);
        next if ($file =~ /^(?:\d+[_-]?)?load.t$/);
        next if ($file =~ /^(?:\d+[_-]?)?boilerplate\.t$/);
        next if ($file =~ /^(?:\d+[_-]?)?pod\.t$/);
        next if ($file =~ /^(?:\d+[_-]?)?pod[_-]?coverage\.t$/);
        # more boilerplate to be added later...
        return 1;
     }
     return 0;
  }

That said, I'm not a Module::CPANTS developer, so I'm not going to dictate priorities. The META.yml prereqs check sounds great.

Chris

--
Chris Dolan, Software Developer, Clotho Advanced Media Inc.
608-294-7900, fax 294-7025, 1435 E Main St, Madison WI 53703
vCard: http://www.chrisdolan.net/ChrisDolan.vcf

Clotho Advanced Media, Inc. - Creators of MediaLandscape Software (http://www.media-landscape.com/) and partners in the revolutionary Croquet project (http://www.opencroquet.org/)


Reply via email to