How Perl::Critic Facilitates Code Best Practices

User: chrisdolan
Date: 9/6/2006 7:36 pm
Views: 790
Rating: 7    Rate [
|
]

http://www.chrisdolan.net/yapcna2006/perlcritic.html

Damian Conway's book "Perl Best Practices" has sparked a revolution in coding style among CPAN developers. Even before that book, many of those developers have wanted a way to judge whether their code conforms with a selection of best practices, hence modules like Perl::Tidy, B::Lint and even "use strict". Perl::Critic is a new module which strives to be a powerful and flexible tool to judge code against a user-selected array of "Policy" modules. Example policies include "CodeLayout::ProhibitHardTabs" and  "TestingAndDebugging::RequireUseStrict". As of v0.15, we have implemented 70 policies, most of which derive from the 256 recommendations made by Conway. The API uses Module::Pluggable to enable third-parties to easily add more policies. A separate Test::Perl::Critic module makes it easy to confirm that your code is still in compliance with your established policies.

In this presentation, I will present Perl::Critic's features and demonstrate how you can start using it against your own code.

Replies

Flat
PreviousBackNext
Madison Area Perl Mongers