Skip Menu |

This queue is for tickets about the Module-CPANTS-Analyse CPAN distribution.

Report information
The Basics
Id: 92267
Status: resolved
Priority: 0/
Queue: Module-CPANTS-Analyse

People
Owner: Nobody in particular
Requestors: ether [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: use_strict metric issues uninitialized warning when modules are missing
xt/release/kwalitee.t ............. 1/? # Failed test 'use_strict' # at xt/release/kwalitee.t line 4. # Error: This distribution does not 'use strict;' (or its equivalents) in all of its modules. Note that this is not about the actual strictness of the modules. It's bad if nobody can tell whether the modules are strictly written or no t, without reading the source code of your favorite clever module that actually enforces strictness. In other words, it's bad if someone feels the need to add 'use strict' to the modules. Use of uninitialized value in concatenation (.) or string at /Users/ether/.perlbrew/libs/19.7@std/lib/perl5/Module/CPANTS/Kwalitee/Uses.pm line 158. # Details: # The following modules don't use strict (or equivalents): # Remedy: Add 'use strict' to all modules, or convince us that your favorite module is well-known enough and people can easily see the modules are strictly written. # Looks like you failed 1 test of 14. The root problem here was that the 'provides' field in metadata was empty, so MCA thought there were no modules. The use_strict code in Module/CPANTS/Kwalitee/Uses.pm returns 0 if $d->{modules} is empty, but in this case there is no $d->{error}{use_strict} set, so the actual error message is not correct. Better would be to have a separate metric for "has modules present" (as every distribution should have at least one), and return success for the use_strict metric in that case.
Thanks for the report. I suppose the following commit should fix this: https://github.com/cpants/Module-CPANTS-Analyse/commit/cec39be9edb64404045bcc81dc3e30951415b0dc On Mon Jan 20 03:18:49 2014, ETHER wrote: Show quoted text
> xt/release/kwalitee.t ............. 1/? > # Failed test 'use_strict' > # at xt/release/kwalitee.t line 4. > # Error: This distribution does not 'use strict;' (or its equivalents) > in all of its modules. Note that this is not about the actual > strictness of the modules. It's bad if nobody can tell whether the > modules are strictly written or no > t, without reading the source code of your favorite clever module that > actually enforces strictness. In other words, it's bad if someone > feels the need to add 'use strict' to the modules. > Use of uninitialized value in concatenation (.) or string at > /Users/ether/.perlbrew/libs/19.7@std/lib/perl5/Module/CPANTS/Kwalitee/Uses.pm > line 158. > # Details: > # The following modules don't use strict (or equivalents): > # Remedy: Add 'use strict' to all modules, or convince us that your > favorite module is well-known enough and people can easily see the > modules are strictly written. > # Looks like you failed 1 test of 14. > > > The root problem here was that the 'provides' field in metadata was > empty, so MCA thought there were no modules. > > The use_strict code in Module/CPANTS/Kwalitee/Uses.pm returns 0 if $d-
> >{modules} is empty, but in this case there is no $d- > >{error}{use_strict} set, so the actual error message is not correct.
> > Better would be to have a separate metric for "has modules present" > (as every distribution should have at least one), and return success > for the use_strict metric in that case.
Closed as 0.94 is released. Thanks. On Thu Jan 23 14:29:07 2014, ISHIGAKI wrote: Show quoted text
> Thanks for the report. I suppose the following commit should fix this: > > https://github.com/cpants/Module-CPANTS- > Analyse/commit/cec39be9edb64404045bcc81dc3e30951415b0dc > > > On Mon Jan 20 03:18:49 2014, ETHER wrote:
> > xt/release/kwalitee.t ............. 1/? > > # Failed test 'use_strict' > > # at xt/release/kwalitee.t line 4. > > # Error: This distribution does not 'use strict;' (or its > > equivalents) > > in all of its modules. Note that this is not about the actual > > strictness of the modules. It's bad if nobody can tell whether the > > modules are strictly written or no > > t, without reading the source code of your favorite clever module > > that > > actually enforces strictness. In other words, it's bad if someone > > feels the need to add 'use strict' to the modules. > > Use of uninitialized value in concatenation (.) or string at > > /Users/ether/.perlbrew/libs/19.7@std/lib/perl5/Module/CPANTS/Kwalitee/Uses.pm > > line 158. > > # Details: > > # The following modules don't use strict (or equivalents): > > # Remedy: Add 'use strict' to all modules, or convince us that your > > favorite module is well-known enough and people can easily see the > > modules are strictly written. > > # Looks like you failed 1 test of 14. > > > > > > The root problem here was that the 'provides' field in metadata was > > empty, so MCA thought there were no modules. > > > > The use_strict code in Module/CPANTS/Kwalitee/Uses.pm returns 0 if > > $d-
> > > {modules} is empty, but in this case there is no $d- > > > {error}{use_strict} set, so the actual error message is not > > > correct.
> > > > Better would be to have a separate metric for "has modules present" > > (as every distribution should have at least one), and return success > > for the use_strict metric in that case.