Perl::Critic::Policy::Bangs::ProhibitCommentedOutCode - Commented-out code is usually noise. It should be removed.
This Policy is part of the Perl::Critic::Bangs distribution.
Commented-out code is often a sign of a place where the developer is unsure of how the code should be. If historical information about the code is important, then keep it in your version control system.
By default, this policy attempts to look for commented out code by looking for variable assignments in code as represented by the regular expression qr/\$[A-Za-z_].*=/ found in a comment. You can change that regex by specifying a value for coderegex.
qr/\$[A-Za-z_].*=/
coderegex
[Bangs::ProhibitCommentedOutCode] coderegex = \$[A-Za-z_].*=/
Andrew Moore <amoore@mooresystems.com>
Adapted from policies by Jeffrey Ryan Thalhammer <thaljef@cpan.org>, Based on App::Fluff by Andy Lester, "<andy at petdance.com>"
Copyright (C) 2006-2009 Andy Lester and Andrew Moore
This library is free software; you can redistribute it and/or modify it under the terms of either the GNU Public License v3, or the Artistic License 2.0.
* http://www.gnu.org/copyleft/gpl.html * http://www.opensource.org/licenses/artistic-license-2.0.php
To install Perl::Critic::Bangs, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perl::Critic::Bangs
CPAN shell
perl -MCPAN -e shell install Perl::Critic::Bangs
For more information on module installation, please visit the detailed CPAN module installation guide.