Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

B::Lint and Perl::Critic for static code analysis

I need to implement lint and Perl::Critic for static code analysis in Perl. I have found B::Lint module for lint in Perl.

  1. Is it really required to use both the modules for static code analysis?
  2. If yes, then how these two modules work together?
like image 589
mypearl Avatar asked Jan 26 '26 10:01

mypearl


1 Answers

B::Lint and Perl::Critic are separate modules.

It is not required to use both modules, but it is useful to use both.

I created a wrapper script for myself to run both in sequence. For example, to analyze a single Perl source code file (file.pl):

perlcritic --brutal --verbose 9 file.pl
perl -MO=Lint file.pl
like image 70
toolic Avatar answered Jan 29 '26 03:01

toolic