I understand that it is best practice to use Modern::Perl rather than use strict and warnings.
With default options, Perl::Critic v1.121 complains about code before strict, even when 'use Modern::Perl' comes before code.
QUESTION: Is the best solution to update the perlcriticrc config like below, or is there a better way?
Source of config below
cat ~/.perlcriticrc
[TestingAndDebugging::RequireUseStrict]
equivalent_modules = Modern::Perl
[TestingAndDebugging::RequireUseWarnings]
equivalent_modules = Modern::Perl
Also of note: Developer Discussion Here
You can "use 5.014" (or higher if available) to implicitly enable "use strict" right in the first line. Perl::Critic likes this native approach much more. After that you are free to still invoke use Modern::Perl if you still feel the need.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With