cpants / www-cpants

cpants tools
Other
21 stars 6 forks source link

use strict in seperate module #29

Closed vpeil closed 11 years ago

vpeil commented 11 years ago

Hi,

we have a separate Module in our , which contains the whole boilerplate and is imported everywhere in our framework Catmandu. https://github.com/LibreCat/Catmandu/blob/master/lib/Catmandu/Sane.pm

But on cpants we get: This distribution does not 'use strict;' in all of its modules. http://cpants.cpanauthors.org/dist/Catmandu I've already looked into your code to patch this, but couldn't find out where this part ist processed.

charsbar commented 11 years ago

use_strict is not about the actual state of strictness. It's tested just by inspecting the source code of modules in a distribution. It fails if strict pragma (or well-known equivalents) is not found in a module. In other words, it should fail if other people can't tell if strictness is enforced just by inspecting the source code of a module, without reading the source code of used modules.

In your case, I don't think Catmandu::Sane is well-known enough that people can easily tell your modules are strictly written. It's failing justifiably. You might want to use better-known equivalents like Modern::Perl, if you really wish to improve the score.