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

Perl::Critic::Policy::NamingConventions::ProhibitMixedCaseSubs3pm

Write "sub my_function{}" instead of "sub myfunction{}".

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.

  sub foo_bar{}   #ok
  sub foo_BAR{}   #ok
  sub FOO_bar{}   #ok
  sub FOO_BAR{}   #ok
  sub Some::Class::foo{}   #ok, grudgingly
  sub FooBar {}   #not ok
  sub FOObar {}   #not ok
  sub fooBAR {}   #not ok
  sub 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.