Almost any set of coding standards is better than none, and were I working for a boss that was a "Best Practices" fanatic, I would be overjoyed at having such an enlightened employer.
That said, despite that fact that I like the book "Perl Best Practices" quite a bit (I've read it around three times now), once I've added up my questions and disagreements on each point, I personally would only recommend following around two-thirds of Damien's recommendations.
Off the top of my head, a few disagreements:
- He recommends his own Class::Std for doing inside-out objects, but it has problems with threads. Quinn Weaver of SF-perlmongers has been pushing Object::InsideOut, and I would probably try that first.
- He seems to like source filters, and I definitely don't (I don't think that any one who uses the perl debugger would enjoy putting up with source filters). So every time he recommends a module, I need to check to see how it was implemented.
- I like interspersed pod style (where each method has an "=item" accompanying the "sub" that explains how to use the method) -- it has it's problems, but overall I think it reduces the comments you need to write for a sub by supplying some verbal info in the form of documentation. I think his arguments for segregated pod boil down to personal taste (when he looks in a code file he wants to see code).
- I have a number of differences on small stylistic issues, though the only one that comes to mind is that I think "unless" improves readability enough that you should use it instead of "if not", even though it's true that "if not" can sometimes make later edits eaisier.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||