Buying Options
Perl Hacks
Print $29.99
Add to Cart
Print+Ebook $32.99
Add to Cart
Ebook $23.99
Add to Cart
Safari Books Online
Add to Cart
What is this?
Print £22.99
Add to Cart
What is this?
Description
Perl Hacks taps into the collective wisdom of the world's most creative Perl gurus, so you can learn from their experiences. It's the perfect book for experienced developers looking for time-saving practical tips or dabblers who are simply curious about Perl's many cool capabilities. Topics include user interaction, data munging, working with modules, object hacks, and debugging.
Full Description
Table of Contents
  1. Chapter 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. Chapter 2 User Interaction

    1. Use $EDITOR As Your UI

    2. Interact Correctly on the Command Line

    3. Simplify Your Terminal Interactions

    4. Alert Your Mac

    5. Interactive Graphical Apps

    6. Collect Configuration Information

    7. Rewrite the Web

  3. Chapter 3 Data Munging

    1. Treat a File As an Array

    2. Read Files Backwards

    3. Use Any Spreadsheet As a Data Source

    4. Factor Out Database Code

    5. Build a SQL Library

    6. Query Databases Dynamically Without SQL

    7. Bind Database Columns

    8. Iterate and Generate Expensive Data

    9. Pull Multiple Values from an Iterator

  4. Chapter 4 Working with Modules

    1. Shorten Long Class Names

    2. Manage Module Paths

    3. Reload Modified Modules

    4. Create Personal Module Bundles

    5. Manage Module Installations

    6. Presolve Module Paths

    7. Create a Standard Module Toolkit

    8. Write Demos from Tutorials

    9. Replace Bad Code from the Outside

    10. Drink to the CPAN

    11. Improve Exceptional Conditions

    12. Search CPAN Modules Locally

    13. Package Standalone Perl Applications

    14. Create Your Own Lexical Warnings

    15. Find and Report Module Bugs

  5. Chapter 5 Object Hacks

    1. Turn Your Objects Inside Out

    2. Serialize Objects (Mostly) for Free

    3. Add Information with Attributes

    4. Make Methods Really Private

    5. Autodeclare Method Arguments

    6. Control Access to Remote Objects

    7. Make Your Objects Truly Polymorphic

    8. Autogenerate Your Accessors

  6. Chapter 6 Debugging

    1. Find Compilation Errors Fast

    2. Make Invisible Characters Apparent

    3. Debug with Test Cases

    4. Debug with Comments

    5. Show Source Code on Errors

    6. Deparse Anonymous Functions

    7. Name Your Anonymous Subroutines

    8. Find a Subroutine's Source

    9. Customize the Debugger

  7. Chapter 7 Developer Tricks

    1. Rebuild Your Distributions

    2. Test with Specifications

    3. Segregate Developer and User Tests

    4. Run Tests Automatically

    5. See Test Failure Diagnostics — in Color!

    6. Test Live Code

    7. Cheat on Benchmarks

    8. Build Your Own Perl

    9. Run Test Suites Persistently

    10. Simulate Hostile Environments in Your Tests

  8. Chapter 8 Know Thy Code

    1. Understand What Happens When

    2. Inspect Your Data Structures

    3. Find Functions Safely

    4. Know What's Core and When

    5. Trace All Used Modules

    6. Find All Symbols in a Package

    7. Peek Inside Closures

    8. Find All Global Variables

    9. Introspect Your Subroutines

    10. Find Imported Functions

    11. Profile Your Program Size

    12. Reuse Perl Processes

    13. Trace Your Ops

    14. Write Your Own Warnings

  9. Chapter 9 Expand Your Perl Foo

    1. Double Your Data with Dualvars

    2. Replace Soft References with Real Ones

    3. Optimize Away the Annoying Stuff

    4. Lock Down Your Hashes

    5. Clean Up at the End of a Scope

    6. Invoke Functions in Odd Ways

    7. Glob Those Sequences

    8. Write Less Error-Checking Code

    9. Return Smarter Values

    10. Return Active Values

    11. Add Your Own Perl Syntax

    12. Modify Semantics with a Source Filter

    13. Use Shared Libraries Without XS

    14. Run Two Services on a Single TCP Port

    15. Improve Your Dispatch Tables

    16. Track Your Approximations

    17. Overload Your Operators

    18. Learn from Obfuscations

  1. Colophon

View Full Table of Contents
Product Details
Title:
Perl Hacks
By:
Chromatic, Damian Conway, Curtis (Ovid) Poe
Publisher:
O'Reilly Media
Formats:
  • Print
  • Ebook
  • Safari Books Online
Print Release:
May 2006
Ebook Release:
February 2009
Pages:
304
Print ISBN:
978-0-596-52674-0
| ISBN 10:
0-596-52674-1
Ebook ISBN:
978-0-596-10604-1
| ISBN 10:
0-596-10604-1
Customer Reviews
About the Authors
  1. Chromatic

    chromatic is the technical editor of the O'Reilly Network, where he edits Perl.com, ONLamp.com, and the Linux and Security dev centers. He is also the author of the Extreme Programming Pocket Guide, Running Weblogs with Slash, and Perl Testing: A Developer's Notebook as well as the editor of BSD Hacks and Gaming Hacks. He is the original author of Test::Builder, the foundation for most modern testing modules in Perl 5, and has contributed many of the tests for core Perl. He has given tutorials and presentations at several Perl conferences, including OSCON.

    View Chromatic's full profile page.

  2. Damian Conway

    Dr. Damian Conway is a Senior Lecturer in Computer Science and Software Engineering at Monash University (Melbourne, Australia), where he teaches object-oriented software engineering. He is an effective teacher, an accomplished writer, and the author of several popular Perl modules. He is also a semi-regular contributor to the Perl Journal. In 1998 he was the winner of the Larry Wall Award for Practical Utility for two modules (Getopt::Declare and Lingua::EN::Inflect) and in 1999 he won his second "Larry" for his Coy.pm haiku-generation module.

    View Damian Conway's full profile page.

  3. Curtis "Ovid" Poe

    Curtis (Ovid) Poe is a CPAN author, a TPF Steering Committee Member, and the TPF Grant Committee Secretary. He likes long walks on the beach and single malt scotch, but hates writing bios. Ovid writes for Perl.com too.

    View Curtis "Ovid" Poe's full profile page.

  • Book cover of Perl Hacks