|Problems? Is your data what you think it is?|
Re^4: On being 'critical'by jthalhammer (Friar)
|on Jan 01, 2007 at 06:45 UTC||Need Help??|
I referred to Perl::Critic as a "cargo cult compliance module".
That is pretty catchy! :)
I won't get into the debate about the merit of coding standards or the virtues of PBP. frodo72 and the other monks on this thread have already argued on that issue far better than I could.
But I would like to point out that Perl::Critic is very flexible. Perl::Critic does not force you to follow every rule in every situation.
If a Policy isn't appropriate for a particular project, you can disable that Policy in the project's local perlcriticrc profile. This is especially useful in legacy systems when you don't want to cause a lot of churn just for the sake of Perl::Critic compliance.
If you need to bend the rules within a particular module or subroutine, you can use the "## no critic" pseudo-pragmas to disable a Policy at specific points in the code. This signals to others that you have thought through your choice and are making a conscious decision to deviate from some standard.
And you can always write custom Policy modules to suit your own tastes. Perl-Critic-More, Perl-Critic-Lax, and Perl-Critic-Bangs are some examples. Your custom Policies can be a flexible and forgiving as you like.
Happy New Year!