Section B.16. Chapter 17, Modules


B.16. Chapter 17, Modules

  • Design the module's interface first. [Interfaces]

  • Place original code inline. Place duplicated code in a subroutine. Place duplicated subroutines in a module. [Refactoring]

  • Use three-part version numbers. [Version Numbers]

  • Enforce your version requirements programmatically. [Version Requirements]

  • Export judiciously and, where possible, only by request. [Exporting]

  • Consider exporting declaratively. [Declarative Exporting]

  • Never make variables part of a module's interface. [Interface Variables]

  • Build new module frameworks automatically. [Creating Modules]

  • Use core modules wherever possible. [The Standard Library]

  • Use CPAN modules where feasible. [CPAN]



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