Perl::...mmunity(3pm)

πŸ“¦
version 1.0.4 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

Perl::Critic::Community β€” the community-inspired Perl::Critic policies, bestie ✨


πŸŽ€ SYNOPSIS πŸŽ€

okay so you literally just run it, no cap:

$ perlcritic --theme community script.pl
$ perlcritic --theme community lib/

# .perlcriticrc
theme = community
severity = 1

that's it. that's the whole vibe. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so this is a whole set of Perl::Critic policies that enforce the practices that subsets of the Perl community generally recommend β€” especially the folks on IRC, fr fr. it used to be called Perl::Critic::Freenode, iconic name change tbh.

because this policy "theme" is designed to be used with zero configuration on the command line, some duplication will occur if you use it in combination with core Perl::Critic policies. that's just how it is, bestie, don't fight it. πŸ™ˆ


🌸 AFFILIATION 🌸

okay so this module has no functionality β€” not a single one. it's literally just documentation for this distribution and a way to pull other modules into a bundle. all the Policy modules in here have their own "AFFILIATION" section announcing that they're part of this grouping. so if you're like "where's the code" β€” there is none. it's giving ✨vibes only✨.


πŸ‘‘ POLICIES πŸ‘‘

here's the whole roster, the main characters, every single one:

  • Perl::Critic::Policy::Community::AmpersandSubCalls β€” Don't use "&" to call subroutines
  • Perl::Critic::Policy::Community::ArrayAssignAref β€” Don't assign an anonymous arrayref to an array
  • Perl::Critic::Policy::Community::BarewordFilehandles β€” Don't use bareword filehandles other than built-ins
  • Perl::Critic::Policy::Community::ConditionalDeclarations β€” Don't declare variables conditionally
  • Perl::Critic::Policy::Community::ConditionalImplicitReturn β€” Don't end a subroutine with a conditional block
  • Perl::Critic::Policy::Community::DeprecatedFeatures β€” Avoid features that have been deprecated or removed from Perl
  • Perl::Critic::Policy::Community::DiscouragedModules β€” Various modules discouraged from use
  • Perl::Critic::Policy::Community::DollarAB β€” Don't use $a or $b as variable names outside sort()
  • Perl::Critic::Policy::Community::Each β€” Don't use each() to iterate through a hash
  • Perl::Critic::Policy::Community::EmptyReturn β€” Don't use "return" with no arguments
  • Perl::Critic::Policy::Community::IndirectObjectNotation β€” Don't call methods indirectly
  • Perl::Critic::Policy::Community::LexicalForeachIterator β€” Don't use undeclared foreach loop iterators
  • Perl::Critic::Policy::Community::LoopOnHash β€” Don't loop over hashes
  • Perl::Critic::Policy::Community::ModPerl β€” Don't use "mod_perl" to write web applications
  • Perl::Critic::Policy::Community::MultidimensionalArrayEmulation β€” Don't use multidimensional array emulation
  • Perl::Critic::Policy::Community::OpenArgs β€” Always use the three-argument form of open()
  • Perl::Critic::Policy::Community::OverloadOptions β€” Don't use overload without specifying a bool overload and enabling fallback
  • Perl::Critic::Policy::Community::PackageMatchesFilename β€” Module files should declare a package matching the filename
  • Perl::Critic::Policy::Community::POSIXImports β€” Don't use POSIX without specifying an import list
  • Perl::Critic::Policy::Community::PreferredAlternatives β€” Various modules with preferred alternatives
  • Perl::Critic::Policy::Community::Prototypes β€” Don't use function prototypes
  • Perl::Critic::Policy::Community::SplitQuotedPattern β€” Quote the split() pattern argument with regex slashes
  • Perl::Critic::Policy::Community::StrictWarnings β€” Always use strict and warnings, or a module that imports these
  • Perl::Critic::Policy::Community::Threads β€” Interpreter-based threads are officially discouraged
  • Perl::Critic::Policy::Community::Wantarray β€” Don't write context-sensitive functions using wantarray()
  • Perl::Critic::Policy::Community::WarningsSwitch β€” Scripts should not use the "-w" switch on the shebang line
  • Perl::Critic::Policy::Community::WhileDiamondDefaultAssignment β€” Don't use "while" with implicit assignment to $_

⭐ CONFIGURATION AND ENVIRONMENT ⭐

all the policies included are in the "community" theme, periodt. for how to actually make use of that, go read the Perl::Critic documentation. iykyk 🫢


πŸ’œ AUTHOR πŸ’œ

Dan Book, dbook@cpan.org β€” absolute legend πŸ’–


🌈 CONTRIBUTORS 🌈

the whole squad showed up:

  • Graham Knop (haarg)
  • H.Merijn Brand (Tux)
  • John SJ Anderson (genehack)
  • Matt S Trout (mst)
  • William Taylor (willt)

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.


πŸ”₯ SEE ALSO πŸ”₯

  • Perl::Critic

okay bestie that's the whole page πŸ’… go forth and lint, you're gonna slay. this was perl v5.40.1, dated 2025-03-22, from the User Contributed Perl Documentation for Perl::...mmunity(3pm) β€” mwah, bye! πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from