Book Review: Perl Medic

Robrt on 2004-04-07T22:26:14

As you might expect, I own lots of computer books. Quite a few of them are perl books. Most of them I've read, some of them I use as reference. Now I've got a book to use as a gift.

Peter Scott's Perl Medic is presented as a book for "Transforming Legacy Code", but it could also be called "Perl Best Practices" or "The Things Every Perl Programmer Should Know."

That may sound silly, but more than once I thought: "This feels like it was taken straight from my brain." Anyway, on to more details.

The book is structured as if the reader was being handed a program to maintain or update. It talks about different ways one might receive a program, and the different conditions it might be in. (From "Bad" to "Really Really Bad perl4 code.") It then proceeds to walk you through analyzing the code and figuring out where to take it, and how to slowly test, mutate, and update the code to run on systems now and into the future.

The tone and style of the book is lightweight and fun, which makes it an easy read. (And one that you don't want to put down.) It manages to squeeze in everything from use warnings, testing, debugging, and modules to the differences between Perl versions and a case study. The book doesn't stop at just the how, but delves into the why each piece is important.

If you're a moderately advanced perl programmer, there probably isn't anything new in this book. But buy it anyway. And buy it for your co-workers. It is a good reminder and overview and will help you make your code cleaner and easier to maintain. Good code isn't just for rewriting -- if you write it well in the first place, imagine all the time you can save later.

Buy Me!