Perl Best Practices : Book Review

Having been a perl coder on and off for nine years, I thought I’d take a look at Damian Conway’s Perl Best Practices.

Overall .. I like it.

I pick it up, read something, put it down.
Then pick it up again another day.

I am a little mixed in my opinion about all of his best practices, but that’s because I am used to quite a few habits (probably bad). His best practice for creating objects is still mucking with my head. The old syntax of return bless {}; is just too ingrained and allows some easier hacks modifications.

Things I like:

  • Documentation and POD pointers – easy ideas
  • Labels in loops, so you can say “next PERSON”
  • General explanation of normal things (ordering arrays, sorting, modules) etc
  • Well written and informative

Alan Perlis says that

“A language that doesn’t affect the way you think about programming is not worth knowing”

However, in this case, this book affects the way I think about programming (in perl), so I think the book is worth reading.

Even though some people say that perl is an ancient dying language, I still use it to do a few jobs. I still think that languages like Perl can be used effectively today. It all depends on what you’re used to.

These habits explain how to break old ugly habits, and create some cleaner code that is easier to maintain.

Rating: 8/10

Leave a Reply