I'm using Import::Base to generate boilerplate for my tests:
package Test::Utils; use parent 'Import::Base'; our @IMPORT_MODULES = ( 'strict', 'warnings', feature => [qw(:5.14)], 'Data::Dumper' => [qw(Dumper)], 'Test::More', 'Test::Exception', 'Test::Output', 'Test::Dirs', 'Test::Utils::Dump' => [qw(d d0 d1 $doff)], 'Term::ANSIColor', );
At the top of my test file, I have use Test::Utils and so strict is in effect. However, since perlcritic doesn't compile all the code, it's throwing warnings at me about not using strict. I tried to quiet the warnings in a .perlcriticrc file in my t directory:
severity = 5 [-TestingAndDebugging::RequireUseStrict]
But in nvim, I'm still seeing "S>" in a red background and when I put my cursor on the first line of code, the status line is showing this warning: "(5) Code before strictures are enabled (See page 429 of PBP)". Anything else I can do to suppress this warning?
UPDATE: I thought I found a solution using equivalent_modules=Test::Utils but it had no effect.
$PM = "Perl Monk's";
$MC = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar Parson";
$nysus = $PM . ' ' . $MC;
Click here if you love Perl Monks
In reply to SOLVED: Can't figure out how to quiet perlcritic and ignore RequireUseStrict perlcritic rule by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |