Foreword
Preface
1. Introduction: Becoming a Master
What It Means to Be a Master
Who Should Read This Book
How to Read This Book
What Should You Know Already?
What I Cover
What I Don't Cover
2. Advanced Regular Expressions
References to Regular Expressions
Noncapturing Grouping, (?:PATTERN)
Readable Regexes,/x and (?#...)
Global Matching
Lookarounds
Deciphering Regular Expressions
Final Thoughts
Summary
Further Reading
3. Secure Programming Techniques
Bad Data Can Ruin Your Day
Taint Checking
Untainting Data
List Forms of system and exec
Summary
Further Reading
4. Debugging Perl
Before You Waste Too Much Time
The Best Debugger in the World
perlSdb.pl
Alternative Debuggers
Other Debuggers
Summary
Further Reading
5. Profiling Perl
Finding the Culprit
The General Approach
Profiling DBI
Devel: :DProf
Writing My Own Profiler
Profiling Test Suites
Summary
Further Reading
6. Benchmarking Perl
Benchmarking Theory
Benchmarking Time
Comparing Code
Don't Turn Off Your Thinking Cap
Memory Use
The perlbench Tool
Summary
Further Reading
7. Cleaning Up Perl
Good Style
perltidy
De-Obfuscation
Perl::Critic
Summary
Further Reading
8. SymboITablesandTypeglobs
Package and Lexical Variables
The Symbol Table
Summary
Further Reading
9. Dynamic Subroutines
Subroutines As Data
Creating and Replacing Named Subroutines
Symbolic References
Iterating Through Subroutine Lists
Processing Pipelines
Method Lists
Subroutines As Arguments
Autoloaded Methods
Hashes As Objects
AutoSplit
Summary
Further Reading
10. Modifying and Jury-Rigging Modules
Choosing the Right Solution
Replacing Module Parts
Subclassing
Wrapping Subroutines
Summary
Further Reading
11. Configuring Perl Programs
Things Not to Do
Better Ways
Command-Line Switches
Configuration Files
Scripts with a Different Name
Interactive and Noninteractive Programs
perl's Con fig
Summary
Further Reading
12. Detecting and Reporting Errors
Perl Error Basics
Reporting Module Errors
Exceptions
Summary
Further Reading
13. Logging
Recording Errors and Other Information
Eog4perl
Summary
Further Reading
14. Data Persistence
Flat Files
Storable
DBM Files
Summary
Further Reading
15. Working with Pod
The Pod Format
Translating Pod
Testing Pod
Summary
Further Reading
16. Working with Bits
Binary Numbers
Bit Operators
Bit Vectors
The vec Function
Keeping Track of Things
Summary
Further Reading
17. The Magic of Tied Variables
They Look Like Normal Variables
At the User Level
Behind the Curtain
Scalars
Arrays
Hashes
Filehandles
Summary
Further Reading
18. Modules As Programs
The main Thing
Backing Up
Who's Calling?
Testing the Program
Distributing the Programs
Summary
Further Reading
A. Further Reading
B. brian's Guide to Solving Any Perl Problem
Index