http://qs321.pair.com?node_id=64424
Order Debugging Perl: Troubleshooting for Programmers

Item Description: A guide to writing more troublefree code and finding problems in the code you have.

Review Synopsis:

Debugging Perl by Martin Brown - Snapshot
The good
  • Covers general Perl traps and some internals
  • Offers suggestions for programming style and design
  • Ideas for writing more reliable and maintainable code
  • Tips for cpu and memory optimizations
  • Platform specific issues - particularily Windows
The bad
  • Rewarms existing documentation such as perltrap and perldiag
  • Some typos and errors
  • Thin coverage of actually using the Perl Debugger
  • Material strays from the bounds of debugging and optimization and style
As Perl programmers we can never work hard enough on writing reliable and, dare I say, bug free programs. I feel Martin Brown's book Debugging Perl would be a suppliment for someone so motivated.

Although the title suggests a 1000 and 1 ways to use the Perl debugger, it is more than that. It is about techniques and approaches to write code with less bugs in addition to debugging existing code. Brown provides coverage of Perl internals topics, programming style and techniques. He also addresses some issues to do with code optimization and efficiency issues.

Prior to reading Debugging Perl I was not aware of the multitude of debugging output flags that you can use when executing a Perl program. I have dabbled with other subjects such as profiling and compiler backends, but was pleased to see Brown covering these and adding to my understanding of them. The term debugging is a loaded one and subject to many interpretations. For some debugging might mean findind the failure in their program. A syntax error or a runtime error. Others it might be trying to figure out why their memory is getting chewed up or they are running short of CPU time. You might even be contemplating bugs waiting to happen in someones scary code.

Granted, we all have our own programming styles. And from that perspective I view Brown's book as:

  1. alternate explainations on familiar Perl topics
    such as: Perl internals and traps
  2. suggested coding styles
  3. suggestions on reliable coding techniques
  4. an introduction to topics you might have skipped in the past
With a subject as broad as debugging and reliable coding you are going to have to pick and choose what is important to you and what you will ultimately decide to adopt and what you will disregard.

All and all, I would suggest that this is an solid supplement to your collection of O'Reilly books and is of value to those who wish to become a better and better Perl programmer. Scan it over the next time you're at your local bookstore and decide for yourself!

  Table of Contents for Debugging Perl

  Chapter 1: Introduction.
  Part I: Perl Logic and Syntax.
  Chapter 2: How Perl Parses a Statement.
  Chapter 3: Variable Problems.
  Chapter 4: Regular Expression Traps.
  Chapter 5: Using Abstraction as a Design Methodology.
  Chapter 6: Language/Platform Migration Guide.
  Part II: Error Trapping.
  Chapter 7: Basic Error Trapping.
  Chapter 8: Using Pragmas and Warnings.
  Chapter 9: Manual Degbugging Techniques.
  Chapter 10: The Perl Debugger.
  Part III: Optimizing Your Code.
  Chapter 11: Manual Optimization.
  Chapter 12: Automatic Optimization.
  Part IV: Testing Your Code.
  Chapter 13: Building a Test Harness.
  Chapter 14: Breaking Your Code.
  Part V: Appendices. 
Update: Read Linux Journal's review that jmcnamara so excellently supplied. After reading Paul's comments and I revised my review. Although, I feel that Paul's review is pretty harsh I can see how some people might see the book from his perspective. Personally, I still feel that Debugging Perl has value in my library and has given me my money and time's worth.

  • Comment on Debugging Perl: Troubleshooting for Programmers
Replies are listed 'Best First'.
Re: Debugging Perl: Troubleshooting for Programmers
by jmcnamara (Monsignor) on Mar 15, 2001 at 15:29 UTC

      It's a pretty fair review too. Martin Brown seems to have created a one-man industry out of repackaging the standard Perl documentation :)

      Addison-Wesley have a book called "Perl Debugged" due out in a couple of months. I haven't read it, but people who have tell me that it'll be well worth reading when it arrives.

      --
      <http://www.dave.org.uk>

      "Perl makes the fun jobs fun
      and the boring jobs bearable" - me

        I've just written a short book review of Perl Debugged
        It is a good read and informative.

        Plato
Re (tilly) 1: Debugging Perl: Troubleshooting for Programmers
by tilly (Archbishop) on Mar 15, 2001 at 16:05 UTC
    There is interesting discussion (and disagreements) about the utility of debuggers for debugging starting at Are debuggers good?

    The discussion starting at Random thoughts on programming also has much valuable advice to help you avoid (or failing that to track down) bugs.

Re: Debugging Perl: Troubleshooting for Programmers
by frankus (Priest) on Mar 15, 2001 at 17:08 UTC
    Damien Conway's `OO Perl' it ain't :)

    I did enjoy this book, though I don't really know why. It's like Effective Perl: a collection of wise saws.

    I liked the section on dispatch tables, it answered a few queries I was having, but left several more unanswered.

    I got it from the library and I have considered buying it, after Data Munging, Perl Cookbook and Effective Porgramming.

    --
    
    Brother Frankus.
Re: Debugging Perl: Troubleshooting for Programmers
by Hanamaki (Chaplain) on Sep 06, 2001 at 19:31 UTC
    Additional Information:

    At Osborne's Product Page for the book you will find the TOC and a sample chapter as pdf files.

    Hanamaki