Subject: | Misleading error in Module::CPANTS::Kwalitee::Uses |
Date: | Sat, 16 Aug 2014 16:35:33 +0100 |
To: | <bug-Module-CPANTS-Analyse [...] rt.cpan.org> |
From: | "Duncan Garland" <duncan.garland [...] ntlworld.com> |
Hi,
I missed the extension off one of the files listed in META.yml.
Test::Kwalitee reported this as a failure to use strict. It quite obviously
did use strict, and it took me ages to track down the true cause.
This section of code:
69: my $p = Module::ExtractUse->new;
70: my $file = catfile($distdir,$_->{file});
71: $p->extract_use($file) if -f $file;
72: $_->{uses} = $p->used;
73
Checks if the file exists, but doesn't issue a warning or an error if it
doesn't. It simply passes on an empty list and the module later reports that
The module does not use strict.
Can this be changed to issue a message? Even something simple would help:
if ( -f $file ) {
$p->extract_use($file);
else {
warn "File $file which is listed in META.yml does not exist."
}
Thanks