You say perlcritic
doesn't do what you want, but that you want it to do what you want. As such, you will need modify perlcritic
, or more specifically, Perl:: Critic:: Policy:: TestingAndDebugging:: RequireUseWarnings. You should have no problems getting your changes accepted because the lack of shebang parsing is listed as a bug in the documentation.
It might be simpler to edit your files. It's quite trivial to do so mechanically. Assuming you already use use strict;
,
find -type f \( -name '*.pl' -o -name '*.pm' \) ! -name '*~' -exec \
perl -i~ -0777pe's/^(\s*)use strict\b.*\n\K/${1}use warnings;\n/mg' {} +