Critique Perl source code for best-practices.

Edit Package perl-Perl-Critic
http://search.cpan.org/dist/Perl-Critic/

Perl::Critic is an extensible framework for creating and applying coding
standards to Perl source code. Essentially, it is a static source code
analysis engine. Perl::Critic is distributed with a number of
Perl::Critic::Policy modules that attempt to enforce various coding
guidelines. Most Policy modules are based on Damian Conway's book *Perl
Best Practices*. However, Perl::Critic is *not* limited to PBP and will
even support Policies that contradict Conway. You can enable, disable, and
customize those Polices through the Perl::Critic interface. You can also
create new Policy modules that suit your own tastes.

For a command-line interface to Perl::Critic, see the documentation for
perlcritic. If you want to integrate Perl::Critic with your build process,
Test::Perl::Critic provides an interface that is suitable for test
programs. Also, Test::Perl::Critic::Progressive is useful for gradually
applying coding standards to legacy code. For the ultimate convenience (at
the expense of some flexibility) see the criticism pragma.

Win32 and ActivePerl users can find PPM distributions of Perl::Critic at
the http://theoryx5.uwinnipeg.ca/ppms/ manpage and Alexandr Ciornii's
downloadable executable at the http://chorny.net/perl/perlcritic.html
manpage.

If you'd like to try Perl::Critic without installing anything, there is a
web-service available at the http://perlcritic.com manpage. The web-service
does not yet support all the configuration features that are available in
the native Perl::Critic API, but it should give you a good idea of what it
does. You can also invoke the perlcritic web-service from the command-line
by doing an HTTP-post, such as one of these:

$> POST http://perlcritic.com/perl/critic.pl < MyModule.pm
$> lwp-request -m POST http://perlcritic.com/perl/critic.pl < MyModule.pm
$> wget -q -O - --post-file=MyModule.pm http://perlcritic.com/perl/critic.pl

Please note that the perlcritic web-service is still alpha code. The URL
and interface to the service are subject to change.

Also, the Perl Development Kit (PDK 8.0) from ActiveState includes a very
slick graphical interface to Perl-Critic. For details, go to the
http://www.activestate.com/perl_dev_kit manpage

Refresh
Refresh
Source Files
Filename Size Changed
Perl-Critic-1.117.tar.gz 0000645793 631 KB
perl-Perl-Critic.changes 0000006575 6.42 KB
perl-Perl-Critic.spec 0000010476 10.2 KB
Revision 10 (latest revision is 35)
Stephan Kulow's avatar Stephan Kulow (coolo) accepted request 104888 from Stephan Kulow's avatar Stephan Kulow (coolo) (revision 10)
- updated to 1.117
  New Policies:
  * Variables::ProhibitAugmentedAssignmentInDeclaration reports
    constructs like 'my $x += 1'. Contributed by Mike O'Regan
  Policy Changes:
  * BuiltinFunctions::ProhibitLvalueSubstr: Add explicit 'use version'.
    RT #68498.
  * CodeLayout::ProhibitHardTabs: Add 'pbp' to the default_themes list.
    RT #71093.
  * ControlStructures::ProhibitMutatingListFunctions now understands that
    tr///r (introduced in 5.13.7) does not change its operand.
  * ControlStructures::ProhibitMutatingListFunctions now understands that
    '//=', '<<=', and '>>=' are assignment operators. RT #70901.
  * ErrorHandling::RequireCheckingReturnValueOfEval now allows things
    like grep { eval $_ }. RT #69489.
  * Modules::RequireExplicitPackage now has configuraion option
    allow_import_of, to allow the import of specified modules before
    the package statement. RT #72660.
  * RegularExpressions::ProhibitEnumeratedClasses no longer thinks
    that [A-Za-z_] matches \w. RT #69322.
  * RegularExpressions::ProhibitUnusedCaptures now skips the first
    block of an 'if' or 'elsif' if the regular expression is bound to
    its operand with the '!~' operator. RT #69867.
  * RegularExpressions::ProhibitUnusedCaptures now looks into lists
    and blocks in the replacement portion of the regular expression if
    /e is asserted. RT #72086.
  * RegularExpressions::RequireDotMatchAnything,
    RegularExpressions::RequireExtendedFormatting and
    RegularExpressions::RequireLineBoundaryMatching now honor defaults
    set with 'use re "/modifiers"'. RT #72151.
Comments 0
openSUSE Build Service is sponsored by