Dist::Zilla strictures tip
So, mst wrote up strictures which basically bundles the "Kensho" pragmas, so to speak: strict, warnings (FATAL!), no indirect (vpit++). It plans for clean separation of different versions so you can maintain compatibility using specific versions of the pragma. How nifty is that? That's right, very nifty!
I'm using Dist::Zilla with Dist::Zilla::Plugin::CriticTests and Dist::Zilla::Plugin::PkgVersion. These are plugins that add Perl::Critic tests to my distribution and add a $VERSION variable automatically when building, respectively.
Now two problems occur:
1. Perl::Critic doesn't know about strictures and basically thinks I don't have "strict" on.
2. Since I'm using PkgVersion, I don't have to put a $VERSION variable. PkgVersion puts one right below the package declaration. This means that some code is written before my strictures.
Both are very easy to fix.
For the first one, I just add this to ~/.perlcriticrc:
equivalent_modules = strictures
Voila! Now Perl::Critic known that "strictures" is basically as good as "strict" for any testing purposes.
The second one is merely putting the strictures usage as the 1st line, before the package declaration:
use strictures 1;
Voici! Now strictures is added before the injected $VERSION variable PkgVersion adds.