Perl::Critic::Policy::NamingConventions::ProhibitMixedCaseVars(3pm)

Perl::Critic::Policy::NamingConventions::ProhibitMixedCaseVars3pm

Write "$my_variable = 42" instead of "$myvariable = 42".

Affiliation

This Policy is part of the core Perl::Critic distribution.

Overview

Conway's recommended naming convention is to use lower-case words separated by underscores. Well-recognized acronyms can be in ALL CAPS, but must be separated by underscores from other parts of the name.

  my $foo_bar   #ok
  my $foo_BAR   #ok
  my @FOO_bar   #ok
  my %FOO_BAR   #ok
  my $FooBar   #not ok
  my $FOObar   #not ok
  my @fooBAR   #not ok
  my %fooBar   #not ok

Configuration

This Policy is not configurable except for the standard options.

Author

Jeffrey Ryan Thalhammer <[email protected]>

From libperl-critic-perl 1.088-1 in Debian 5.0 (Lenny). Parsed by carta from the page's man source.