Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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.


In reply to Re: Perl best practices fanatism by doom
in thread Perl best practices fanatism by cosimo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (8)
As of 2024-04-19 13:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found