Perl::Critic::Pulp - some add-on perlcritic policies
This is a collection of the following add-on policies for
They're under a new "pulp" theme plus other themes according to their function (see "POLICY THEMES" in Perl::Critic).
Version declaration for hash style multi-constants.
New enough Gtk2 version for its constants.
Check Perl version declared against features used.
Check Perl version declared against POD features used.
__END__ before POD at end of file.
Check args to
Locale::TextDomain imported but not used.
Don't import the whole of
Don't quote required version like
use Foo '1.5'
Avoid problems with
FOO < 123
Avoid problems with
$x == $y
Stray consecutive commas
Literal use of
Roughly half are bugs and half cosmetic. You can always enable or disable the ones you do or don't want. It's normal to pick and choose what you want reported.
There's a lot of perlcritic builtin and add-on policies and they range from helpful to restrictive to bizarre and in some cases are even mutually contradictory. Many are building blocks for particular restricted house styles. If you tried to pass all you'd give away half the language. If you're not turning off or customizing up to half then either you're not trying or you're much too easily lead!
In most of the perlcritic docs,
including Pulp here,
policy names appear without the full
Perl::Critic::Policy::... class name.
In Emacs try the author's
man-completion.el to automatically get the man page from a suffix part at point,
ffap-perl-module.el to go to the source similarly.
In perlcritic's output you can ask for %P for the full policy name to paste or follow. Here's a good format you can put in your .perlcriticrc for file:line:column: which Emacs will recognise. See Perl::Critic::Violation for all the
verbose=%f:%l:%c:\n %P\n %m\n
perlcritic.el has patterns to match the perlcritic builtin formats, but it's easier to print file:line:column: in the first place.
Copyright 2008, 2009 Kevin Ryde
Perl-Critic-Pulp is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
Perl-Critic-Pulp is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Perl-Critic-Pulp. If not, see <http://www.gnu.org/licenses/>.