Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of Aragorn (2708)

Wednesday January 25, 2006
05:42 AM

Pro Perl Debugging

[ #28463 ]

This morning I finished reading the book "Pro Perl Debugging", by Richard Foley. It's a missed chance. The topic of using the Perl debugger is an interesting one, and the basic information on using it is sound. Unfortunately, the book is absolutely riddled with presentational errors. From wrong fonts to mismatches in the initial code listings, and the code which is seen in the debugging walkthrough.

Some examples:

In listing 4-1, a program is presented which contains a bug. Unfortunately, the buggy program contains a bug:

Line 9 in the listing says: my $regex = $ENV{REGEX} || '[\$\@\%\*]]+'; But in the walkthrough, line 9 suddenly is my $regex = $ENV{REGEX} || '[\$\@\%\*]&+';. See the difference?

In chapter 11, debugging regular expressions is discussed. A common abbreviation of "regular expression" is "regex". But why is "regex" printed in a monospaced font? Totally unnecessary.

When showing a transcript of something you do on the command-line, be sure that the command-line shown is actually what produces the subsequent output:

perldb -Dr -e '"spott" =~ /spot/'
[line snipped]
Guessing start of match, REx 'spot' against 'sxpott'...

I think the extra costs of have the book have a hardcover could have been spent better on technical review and editing.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • ... but perhaps choice of publishers, including their editing style and goals. I won't say more, so as not to offend any friends I might still have, after making that statement.
    • Randal L. Schwartz
    • Stonehenge