Perl Best Practices

Perl Best Practices (PBP) by Damian Conway is a collection of 256 short essays on how to code well. Damian’s advice is geared toward creating solid, bug free, maintainable code. Three observations about the book:

PBP tells you how to write good Perl until you have enough experience to know better. Then you’ll write Perl like the book suggests because you do know better.

PBP is like “use strict”. At first using each seems overbearing and painful, after awhile you wonder how you endured the pain of not using them.

PBP describes programming habits that, if followed, will make your programming time more productive. It will also make it more enjoyable, unless you actually like beating your head against the wall searching for self-introduced bugs.

I kept PBP by my side as a reference for keeping code clean while doing the push to convert fut from a warty Perl thing masquerading as a program to a reasonably executed piece of code. [ed., there's still a lot of work to do] Its advice, especially the oft criticized bits about source formatting, helped make the bugs I introduced easier to find because the program was easier to read. When I felt it was time to make fut available to other people the sections on command line option parsing and config file sturcture were a complete guide into the new to me territory.

Highly recommended.

Leave a Reply

  

  

  

You must properly answer this question to post your comment.

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>