Back to the book website

PSDT logo

copyright 2002 Perl Debugged
"I'm impressed with the easy elegance of the writing... a joy to read such a masterfully written tone covering such a mundane subject, which is a rare find indeed.... fills a void in the Perl literature that's been empty for far too long. Perl Medic is an essential work, offering great benefits to professional Perl programmers. Every journeyman Perl programmer can benefit from the book's gentle guidance in identifying the best ways to write Perl code."

-Tim Maher, Perl speaker, author, educator, and "White Camel" awardee

A quote on the front cover of this book says "if you code in Perl then you need to read this book". That's a pretty bold claim to make. It made me think of the hyperbole on covers of books that claim to teach you to program in Perl in just a few days. But this book is published by Addison Wesley, who are a well respected technical publisher of technical books and the quote is from Adam Turoff who certainly knows what he's talking about when it comes to Perl programming. So in this case the claim isn't hyperbole. The book really is one that I want every Perl programmer to read.

Perl gets a lot of bad press from people who claim that it encourages people to write unreadable code. Whilst there's certainly a lot of very bad Perl code out there I think that's more a sign that it's used by a lot of people who don't know how to program than a reflection on the language itself. And that's where this book comes in. It assumes that you are familiar with the syntax of Perl but that you've never really been shown how to use it effectively. Which is a situation that many Perl programmers find themselves in.

Perl Medic is actually targetted at people who have to maintain older Perl code written by someone else, but I think that the information it contains is just as useful to anyone coding in Perl. Peter Scott has a lot of experience in writing Perl and in training other people to write Perl and the distillation of that experience and knowledge into these 300-odd pages mean that there are few Perl programmers who won't pick up something useful from this book.

The main emphasis in the book is on increasing the maintainability of code. The techniques are wide-ranging. I particularly enjoyed the examples of refactoring programs and the coverage of using modules from CPAN. Two other very good sections are the one on antipatterns in chapter 4 and the one on cargo cult programming in chapter 6. Together these sections give a programmer a number of easy to recognise quick wins when improving existing code and a checklist of things not to do when writing new code.

There are a couple of niggles. I've already mentioned that I think the book has been slightly mis-targetted and that it should have been aimed at anyone writing Perl code. The other problem that I had was that the medic analogy that runs through the book gets a bit strained at times. But these are only minor and they shouldn't prevent you from adding this book to your library.

In fact, all in all, the quote on the front cover is pretty accurate.

-Dave Cross, Perl Mongers User Groups Co-ordinator

"It has lots of concrete advice on approaching existing legacy Perl code [...] If you're faced with this sort of task and are unsure how to approach it then it's definitely worth looking at."

- Adrian Howard

"In my opinion, "Perl Medic" is very-very helpful, intimate book which will help Perl developers to get skills of good coding!"

- from posting on Perl Monks website

Perl Medic brings together all the disparate bits of knowledge and "it hurts when I do that" I've accumulated in my deteriorating brain over the years, bringing them all within reach again.
- Casey West, Creator of the Perl Beginner's List
Top of "Kudos" | Perl Medic Website

© Pacific Systems Design Technologies. Revised 11/11/2004