Perl Best Practices 9780596555023, 0596555024

Perl Best Practices offers a collection of 256 guidelines on the art of coding to help you write better Perl code--in fa

1,310 205 2MB

English Pages 633 Year 2009

Report DMCA / Copyright

DOWNLOAD FILE

Perl Best Practices
 9780596555023, 0596555024

Table of contents :
Content: Perl Best Practices
Conventions Used in This Book
Code Examples
Feedback
Acknowledgments
1. Best Practices
Efficiency
Maintainability
This Book
Rehabiting
2. Code Layout
Keywords
Subroutines and Variables
Builtins
Keys and Indices
Operators
Semicolons
Commas
Line Lengths
Indentation
Tabs
Blocks
Chunking
Elses
Vertical Alignment
Breaking Long Lines
Non-Terminal Expressions
Breaking by Precedence
Assignments
Ternaries
Lists
Automated Layout
3. Naming Conventions
Booleans
Reference Variables
Arrays and Hashes
Underscores
Capitalization
Abbreviations. Ambiguous AbbreviationsAmbiguous Names
Utility Subroutines
4. Values and Expressions
Empty Strings
Single-Character Strings
Escaped Characters
Constants
Leading Zeros
Long Numbers
Multiline Strings
Here Documents
Heredoc Indentation
Heredoc Terminators
Heredoc Quoters
Barewords
Fat Commas
Thin Commas
Low-Precedence Operators
Lists
List Membership
5. Variables
Package Variables
Localization
Initialization
Punctuation Variables
Localizing Punc.

Polecaj historie