Perl::Critic::Community - Community-inspired Perl::Critic policies
$ perlcritic --theme community script.pl $ perlcritic --theme community lib/ # .perlcriticrc theme = community severity = 1
A set of Perl::Critic policies to enforce the practices generally recommended by subsets of the Perl community, particularly on IRC. Formerly known as Perl::Critic::Freenode. Because this policy "theme" is designed to be used with zero configuration on the command line, some duplication will occur if it is used in combination with core Perl::Critic policies.
This module has no functionality, but instead contains documentation for this distribution and acts as a means of pulling other modules into a bundle. All of the Policy modules contained herein will have an "AFFILIATION" section announcing their participation in this grouping.
Don't use & to call subroutines
&
Don't assign an anonymous arrayref to an array
Don't use bareword filehandles other than built-ins
Don't declare variables conditionally
Don't end a subroutine with a conditional block
Avoid features that have been deprecated or removed from Perl
Various modules discouraged from use
Don't use $a or $b as variable names outside sort()
$a
$b
sort()
Don't use each() to iterate through a hash
each()
Don't use return with no arguments
return
Don't call methods indirectly
Don't use undeclared foreach loop iterators
Don't loop over hashes
Don't use mod_perl to write web applications
mod_perl
Don't use multidimensional array emulation
Always use the three-argument form of open()
open()
Don't use overload without specifying a bool overload and enabling fallback
Module files should declare a package matching the filename
Don't use POSIX without specifying an import list
Various modules with preferred alternatives
Don't use function prototypes
Always use strict and warnings, or a module that imports these
Interpreter-based threads are officially discouraged
Don't write context-sensitive functions using wantarray()
wantarray()
Scripts should not use the -w switch on the shebang line
-w
Don't use while with implicit assignment to $_
while
$_
All policies included are in the "community" theme. See the Perl::Critic documentation for how to make use of this.
Dan Book, dbook@cpan.org
dbook@cpan.org
Copyright 2015, Dan Book.
This library is free software; you may redistribute it and/or modify it under the terms of the Artistic License version 2.0.
Perl::Critic
To install Perl::Critic::Community, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perl::Critic::Community
CPAN shell
perl -MCPAN -e shell install Perl::Critic::Community
For more information on module installation, please visit the detailed CPAN module installation guide.