Book description
With more than a million dedicated programmers, Perl has proven to be the best computing language for the latest trends in computing and business. While other languages have stagnated, Perl remains fresh, thanks to its community-based development model, which encourages the sharing of information among users. This tradition of knowledge-sharing allows developers to find answers to almost any Perl question they can dream up.
And you can find many of those answers right here in Perl Hacks. Like all books in O'Reilly's Hacks Series, Perl Hacks appeals to a variety of programmers, whether you're an experienced developer or a dabbler who simply enjoys exploring technology. Each hack is a short lesson--some are practical exercises that teach you essential skills, while others merely illustrate some of the fun things that Perl can do. Most hacks have two parts: a direct answer to the immediate problem you need to solve right now and a deeper, subtler technique that you can adapt to other situations. Learn how to add CPAN shortcuts to the Firefox web browser, read files backwards, write graphical games in Perl, and much more.
For your convenience, Perl Hacks is divided by topic--not according toany sense of relative difficulty--so you can skip around and stop at any hack you like. Chapters include:
- Productivity Hacks
- User Interaction
- Data Munging
- Working with Modules
- Object Hacks
- Debugging
Whether you're a newcomer or an expert, you'll find great value in Perl Hacks, the only Perl guide that offers somethinguseful and fun for everyone.
Table of contents
- A Note Regarding Supplemental Files
- Credits
- Preface
-
1. Productivity Hacks
- 1. Add CPAN Shortcuts to Firefox
- 2. Put Perldoc to Work
- 3. Browse Perl Docs Online
- 4. Make the Most of Shell Aliases
- 5. Autocomplete Perl Identifiers in Vim
- 6. Use the Best Emacs Mode for Perl
- 7. Enforce Local Style
- 8. Don’t Save Bad Perl
- 9. Automate Checkin Code Reviews
- 10. Run Tests from Within Vim
- 11. Run Perl from Emacs
- 2. User Interaction
- 3. Data Munging
-
4. Working with Modules
- 28. Shorten Long Class Names
- 29. Manage Module Paths
- 30. Reload Modified Modules
- 31. Create Personal Module Bundles
- 32. Manage Module Installations
- 33. Presolve Module Paths
- 34. Create a Standard Module Toolkit
- 35. Write Demos from Tutorials
- 36. Replace Bad Code from the Outside
- 37. Drink to the CPAN
- 38. Improve Exceptional Conditions
- 39. Search CPAN Modules Locally
- 40. Package Standalone Perl Applications
- 41. Create Your Own Lexical Warnings
- 42. Find and Report Module Bugs
- 5. Object Hacks
- 6. Debugging
-
7. Developer Tricks
- 60. Rebuild Your Distributions
- 61. Test with Specifications
- 62. Segregate Developer and User Tests
- 63. Run Tests Automatically
- 64. See Test Failure Diagnostics — in Color!
- 65. Test Live Code
- 66. Cheat on Benchmarks
- 67. Build Your Own Perl
- 68. Run Test Suites Persistently
- 69. Simulate Hostile Environments in Your Tests
-
8. Know Thy Code
- 70. Understand What Happens When
- 71. Inspect Your Data Structures
- 72. Find Functions Safely
- 73. Know What’s Core and When
- 74. Trace All Used Modules
- 75. Find All Symbols in a Package
- 76. Peek Inside Closures
- 77. Find All Global Variables
- 78. Introspect Your Subroutines
- 79. Find Imported Functions
- 80. Profile Your Program Size
- 81. Reuse Perl Processes
- 82. Trace Your Ops
- 83. Write Your Own Warnings
-
9. Expand Your Perl Foo
- 84. Double Your Data with Dualvars
- 85. Replace Soft References with Real Ones
- 86. Optimize Away the Annoying Stuff
- 87. Lock Down Your Hashes
- 88. Clean Up at the End of a Scope
- 89. Invoke Functions in Odd Ways
- 90. Glob Those Sequences
- 91. Write Less Error-Checking Code
- 92. Return Smarter Values
- 93. Return Active Values
- 94. Add Your Own Perl Syntax
- 95. Modify Semantics with a Source Filter
- 96. Use Shared Libraries Without XS
- 97. Run Two Services on a Single TCP Port
- 98. Improve Your Dispatch Tables
- 99. Track Your Approximations
- 100. Overload Your Operators
- 101. Learn from Obfuscations
- Index
- About the Authors
- Colophon
- Copyright
Product information
- Title: Perl Hacks
- Author(s):
- Release date: May 2006
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596526740
You might also like
book
40 Algorithms Every Programmer Should Know
Learn algorithms for solving classic computer science problems with this concise guide covering everything from fundamental …
book
Software Engineering at Google
Today, software engineers need to know not only how to program effectively but also how to …
book
Head First Design Patterns, 2nd Edition
You know you don’t want to reinvent the wheel, so you look to design patterns—the lessons …
book
Fundamentals of Software Architecture
Salary surveys worldwide regularly place software architect in the top 10 best jobs, yet no real …