NAME

Perl::Critic::Pulp - some add-on perlcritic policies

DESCRIPTION

This is a collection of the following add-on policies for Perl::Critic. They're under a new "pulp" theme plus other themes according to their function (see "POLICY THEMES" in Perl::Critic).

ConstantBeforeLt -- avoiding problems with FOO < 123

See Perl::Critic::Policy::ValuesAndExpressions::ConstantBeforeLt.

ConstantPragmaHash -- version declaration for hash style multi-constants

See Perl::Critic::Policy::Compatibility::ConstantPragmaHash.

NotWithCompare -- avoiding problems with ! $x == $y

See Perl::Critic::Policy::ValuesAndExpressions::NotWithCompare.

ProhibitEmptyCommas -- stray consecutive commas

See Perl::Critic::Policy::ValuesAndExpressions::ProhibitEmptyCommas.

ProhibitNullStatements -- stray semicolons

See Perl::Critic::Policy::ValuesAndExpressions::ProhibitNullStatements.

ProhibitUseQuotedVersion -- unquoted version string in use Foo '1.5'

See Perl::Critic::Policy::Modules::ProhibitUseQuotedVersion.

RequireEndBeforeLastPod -- __END__ before POD at end of file

See Perl::Critic::Policy::Documentation::RequireEndBeforeLastPod.

TextDomainPlaceholders -- check args to __x and __nx

See Perl::Critic::Policy::Miscellanea::TextDomainPlaceholders.

TextDomainUnused -- Locale::TextDomain imported but not used

See Perl::Critic::Policy::Miscellanea::TextDomainUnused.

UnexpandedSpecialLiteral -- literal use of __PACKAGE__ etc

See Perl::Critic::Policy::ValuesAndExpressions::UnexpandedSpecialLiteral.

Roughly half are about bugs and half cosmetic. You can always enable or disable the ones you do or don't want. You'll have realized there's a lot of perlcritic builtin and add-on policies and they range from very helpful to very bizarre, and in some cases mutually contradictory. So it's quite normal to pick and choose what you want reported. If you're not turning off about a quarter and customizing others then either you're not trying or you're much too easily lead!

OTHER NOTES

In a lot of the perlcritic docs, including the Pulp ones here, policy names appear without the full Perl::Critic::Policy::... class name. In Emacs have a look at man-completion.el to automatically get the man page from a suffix part (at point), or ffap-perl-module.el to go to the source similarly.

In perlcritic's output you can ask for %P for the full name. Here's a good format you can put in your .perlcriticrc with a file:line:column: which Emacs will recognise (see Perl::Critic::Violation for % escapes).

verbose=%f:%l:%c:\n %P\n %m\n

perlcritic.el has patterns to match the perlcritic builtin formats, but it's much easier to print file:line:column: in the first place.

SEE ALSO

Perl::Critic

HOME PAGE

http://www.geocities.com/user42_kevin/perl-critic-pulp/index.html

COPYRIGHT

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/.