Profiling

Perl::Critic can be a resource pig. Profile it and help find the hot spots.

% perl Build.PL
% ./Build
% perl -Mbib -d:DProf t/40_criticize.t
% dprofpp

Incorporate Perl::Critic rules into your projects

This is a great way to get your feet wet and understand the power, and limitations, of Perl::Critic.

You can:

  • Install Perl::Critic
  • Run “perlcritic -top MyModule.pm”
  • Create a custom config file
  • Install Test::Perl::Critic
  • Add a t/perlcritic.t to your dist

Perl::Critic::Bangs

Andy Lester’s set of extensions. One of them checks for variable names ending with digits, but $md5 should be OK.

Random

Andy Lester is having a problem where he runs P::C against Socialtext Open and it complains about “Capture variable used outside conditional”, but that’s apparently not true.