did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780596001735

Perl Best Practices

by
  • ISBN13:

    9780596001735

  • ISBN10:

    0596001738

  • Format: Paperback
  • Copyright: 2005-08-01
  • Publisher: Oreilly & Associates Inc
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $39.99 Save up to $4.00
  • Buy New
    $38.79
    Add to Cart Free Shipping Icon Free Shipping

    USUALLY SHIPS IN 2-3 BUSINESS DAYS

Supplemental Materials

What is included with this book?

Summary

The first book on Perl modules written by a well-known and well-respected member of the Perl community. Includes case studies from the author's vast repertoire of working modules. Coverage of testing and CPAN module specifications are included along with material on distribution files and other coding considerations for intermediate to advanced Perl programmers.

Author Biography

Damian Conway holds a PhD in Computer Science and is an honorary Associate Professor with the School of Computer Science and Software Engineering at Monash University, Melbourne, Australia.

Currently he runs an international IT training company--Thoughtstream--which provides programmer development from beginner to masterclass level throughout Europe, North America, and Australasia.

Damian was the winner of the 1998, 1999, and 2000 Larry Wall Awards for Practical Utility. The best technical paper at the annual Perl Conference was subsequently named in his honour. He is a member of the technical committee for The Perl Conference, a keynote speaker at many Open Source conferences, a former columnist for The Perl Journal, and author of the book Object Oriented Perl. In 2001 Damian received the first "Perl Foundation Development Grant" and spent 20 months working on projects for the betterment of Perl.

A popular speaker and trainer, he is also the author of numerous well-known Perl modules, including Parse::RecDescent (a sophisticated parsing tool), Class::Contract (design-by-contract programming in Perl), Lingua::EN::Inflect (rule-based English transformations for text generation), Class::Multimethods (multiple dispatch polymorphism), Text::Autoformat (intelligent automatic reformatting of plaintext), Switch (Perl's missing case statement), NEXT (resumptive method dispatch), Filter::Simple (Perl-based source code manipulation), Quantum::Superpositions (auto-parallelization of serial code using a quantum mechanical metaphor), and Lingua::Romana::Perligata (programming in Latin).

Most of his time is now spent working with Larry Wall on the design of the new Perl 6 programming language.

Table of Contents

Preface xv
Best Practices
1(7)
Three Goals
3(2)
This Book
5(2)
Rehabiting
7(1)
Code Layout
8(28)
Bracketing
9(2)
Keywords
11(1)
Subroutines and Variables
12(1)
Builtins
13(1)
Keys and Indices
14(1)
Operators
14(1)
Semicolons
15(2)
Commas
17(1)
Line Lengths
18(1)
Indentation
19(1)
Tabs
20(2)
Blocks
22(1)
Chunking
23(1)
Elses
24(2)
Vertical Alignment
26(1)
Breaking Long Lines
27(2)
Non-Terminal Expressions
29(1)
Breaking by Precedence
29(1)
Assignments
30(1)
Ternaries
31(1)
Lists
32(1)
Automated Layout
33(3)
Naming Conventions
36(15)
Identifiers
37(3)
Booleans
40(1)
Reference Variables
41(2)
Arrays and Hashes
43(1)
Underscores
44(1)
Capitalization
45(1)
Abbreviations
46(1)
Ambiguous Abbreviations
47(1)
Ambiguous Names
48(1)
Utility Subroutines
49(2)
Values and Expressions
51(22)
String Delimiters
51(2)
Empty Strings
53(1)
Single-Character Strings
53(1)
Escaped Characters
54(1)
Constants
55(3)
Leading Zeros
58(1)
Long Numbers
59(1)
Multiline Strings
60(1)
Here Documents
61(1)
Heredoc Indentation
61(1)
Heredoc Terminators
62(2)
Heredoc Quoters
64(1)
Barewords
65(1)
Fat Commas
66(2)
Thin Commas
68(2)
Low-Precedence Operators
70(1)
Lists
71(1)
List Membership
71(2)
Variables
73(20)
Lexical Variables
73(2)
Package Variables
75(2)
Localization
77(1)
Initialization
78(1)
Punctuation Variables
79(2)
Localizing Punctuation Variables
81(1)
Match Variables
82(3)
Dollar-Underscore
85(3)
Array Indices
88(1)
Slicing
89(1)
Slice Layout
90(1)
Slice Factoring
90(3)
Control Structures
93(39)
If Blocks
93(1)
Postfix Selectors
94(2)
Other Postfix Modifiers
96(1)
Negative Control Statements
97(3)
C-Style Loops
100(1)
Unnecessary Subscripting
101(2)
Necessary Subscripting
103(2)
Iterator Variables
105(3)
Non-Lexical Loop Iterators
108(2)
List Generation
110(1)
List Selections
111(1)
List Transformation
112(1)
Complex Mappings
113(1)
List Processing Side Effects
114(3)
Multipart Selections
117(1)
Value Switches
118(3)
Tabular Ternaries
121(2)
do-while Loops
123(2)
Linear Coding
125(1)
Distributed Control
126(2)
Redoing
128(1)
Loop Labels
129(3)
Documentation
132(17)
Types of Documentation
132(1)
Boilerplates
133(5)
Extended Boilerplates
138(1)
Location
139(1)
Contiguity
140(1)
Position
140(1)
Technical Documentation
141(1)
Comments
141(1)
Algorithmic Documentation
142(1)
Elucidating Documentation
143(1)
Defensive Documentation
144(1)
Indicative Documentation
145(1)
Discursive Documentation
145(3)
Proofreading
148(1)
Built-in Functions
149(26)
Sorting
149(3)
Reversing Lists
152(1)
Reversing Scalars
153(1)
Fixed-Width Data
154(3)
Separated Data
157(1)
Variable-Width Data
158(3)
String Evaluations
161(3)
Automating Sorts
164(1)
Substrings
165(1)
Hash Values
166(1)
Globbing
167(1)
Sleeping
168(1)
Mapping and Grepping
169(1)
Utilities
170(5)
Subroutines
175(27)
Call Syntax
175(2)
Homonyms
177(1)
Argument Lists
178(4)
Named Arguments
182(2)
Missing Arguments
184(1)
Default Argument Values
185(1)
Scalar Return Values
186(2)
Contextual Return Values
188(3)
Multi-Contextual Return Values
191(3)
Prototypes
194(3)
Implicit Returns
197(2)
Returning Failure
199(3)
I/O
202(25)
Filehandles
202(2)
Indirect Filehandles
204(1)
Localizing Filehandles
205(2)
Opening Cleanly
207(1)
Error Checking
208(1)
Cleanup
209(2)
Input Loops
211(1)
Line-Based Input
212(1)
Simple Slurping
213(1)
Power Slurping
214(2)
Standard Input
216(1)
Printing to Filehandles
217(1)
Simple Prompting
217(1)
Interactivity
218(2)
Power Prompting
220(2)
Progress Indicators
222(2)
Automatic Progress Indicators
224(1)
Autoflushing
224(3)
References
227(8)
Dereferencing
227(1)
Braced References
228(2)
Symbolic References
230(2)
Cyclic References
232(3)
Regular Expressions
235(38)
Extended Formatting
236(1)
Line Boundaries
237(2)
String Boundaries
239(1)
End of String
240(1)
Matching Anything
240(2)
Lazy Flags
242(1)
Brace Delimiters
242(4)
Other Delimiters
246(1)
Metacharacters
247(1)
Named Characters
247(1)
Properties
248(1)
Whitespace
249(1)
Unconstrained Repetitions
250(2)
Capturing Parentheses
252(1)
Captured Values
253(1)
Capture Variables
254(3)
Piecewise Matching
257(2)
Tabular Regexes
259(2)
Constructing Regexes
261(2)
Canned Regexes
263(2)
Alternations
265(1)
Factoring Alternations
266(3)
Backtracking
269(2)
String Comparisons
271(2)
Error Handling
273(26)
Exceptions
274(4)
Builtin Failures
278(1)
Contextual Failure
279(1)
Systemic Failure
280(1)
Recoverable Failure
281(2)
Reporting Failure
283(1)
Error Messages
284(2)
Documenting Errors
286(1)
OO Exceptions
287(3)
Volatile Error Messages
290(1)
Exception Hierarchies
291(1)
Processing Exceptions
292(1)
Exception Classes
293(3)
Unpacking Exceptions
296(3)
Command-Line Processing
299(19)
Command-Line Structure
300(1)
Command-Line Conventions
301(2)
Meta-options
303(1)
In-situ Arguments
304(2)
Command-Line Processing
306(5)
Interface Consistency
311(3)
Interapplication Consistency
314(4)
Objects
318(41)
Using OO
319(1)
Criteria
320(2)
Pseudohashes
322(1)
Restricted Hashes
322(1)
Encapsulation
323(10)
Constructors
333(1)
Cloning
334(2)
Destructors
336(2)
Methods
338(2)
Accessors
340(6)
Lvalue Accessors
346(3)
Indirect Objects
349(2)
Class Interfaces
351(3)
Operator Overloading
354(2)
Coercions
356(3)
Class Hierarchies
359(38)
Inheritance
360(1)
Objects
361(4)
Blessing Objects
365(2)
Constructor Arguments
367(4)
Base Class Initialization
371(5)
Construction and Destruction
376(7)
Automating Class Hierarchies
383(1)
Attribute Demolition
384(3)
Attribute Building
387(1)
Coercions
388(1)
Cumulative Methods
389(4)
Autoloading
393(4)
Modules
397(23)
Interfaces
397(4)
Refactoring
401(3)
Version Numbers
404(1)
Version Requirements
405(2)
Exporting
407(2)
Declarative Exporting
409(2)
Interface Variables
411(4)
Creating Modules
415(2)
The Standard Library
417(1)
CPAN
418(2)
Testing and Debugging
420(21)
Test Cases
420(1)
Modular Testing
421(3)
Test Suites
424(1)
Failure
425(1)
What to Test
426(1)
Debugging and Testing
427(2)
Strictures
429(2)
Warnings
431(1)
Correctness
432(1)
Overriding Strictures
433(3)
The Debugger
436(1)
Manual Debugging
437(2)
Semi-Automatic Debugging
439(2)
Miscellanea
441(28)
Revision Control
441(1)
Other Languages
442(3)
Configuration Files
445(4)
Formats
449(2)
Ties
451(2)
Cleverness
453(1)
Encapsulated Cleverness
454(2)
Benchmarking
456(3)
Memory
459(1)
Caching
460(2)
Memoization
462(1)
Caching for Optimization
463(1)
Profiling
464(2)
Enbugging
466(3)
A. Essential Perl Best Practices 469(3)
B. Perl Best Practices 472(10)
C. Editor Configurations 482(5)
D. Recommended Modules and Utilities 487(6)
E. Bibliography 493(2)
Index 495

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program