I’ve tended to use Perl::Critic for keeping my Perl in some semblence of a readable state for a while now. And since I started using newer Perls, I’ve also used Modern::Perl instead of ‘use strict; use warnings; use feature..’
However, using Modern::Perl means your perlcritic check will fail with ‘code before strictures’. I also use Syntastic in Vim, which means every bit of Perl I write these days gets a nag.
I would’ve thought Perl::Critic would catch up, but evidently not. Then I
discovered it’s actually pretty simple to accept use Modern::Perl
as valid code:
Marks-MacBook:~$ cat ~/.perlcriticrc
[TestingAndDebugging::RequireUseStrict]
equivalent_modules = Modern::Perl
[TestingAndDebugging::RequireUseWarnings]
equivalent_modules = Modern::Perl
Sorted.