Section B.2. Chapter 3, Naming Conventions


B.2. Chapter 3, Naming Conventions

  • Use grammatical templates when forming identifiers. [Identifiers]

  • Name booleans after their associated test. [Booleans]

  • Mark variables that store references with a _ref suffix. [Reference Variables]

  • Name arrays in the plural and hashes in the singular. [Arrays and Hashes]

  • Use underscores to separate words in multiword identifiers. [Underscores]

  • Distinguish different program components by case. [Capitalization]

  • Abbr idents by prefx. [Abbreviations]

  • Abbreviate only when the meaning remains unambiguous. [Ambiguous Abbreviations]

  • Avoid using inherently ambiguous words in names. [Ambiguous Names]

  • Prefix "for internal use only" subroutines with an underscore. [Utility Subroutines]



Perl Best Practices
Perl Best Practices
ISBN: 0596001738
EAN: 2147483647
Year: 2004
Pages: 350
Authors: Damian Conway

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net