I think your goal is laudable. You'll find quite a few discussions on PM about PBP and several that come out generally against some of them. I'd sum up the overall drift as "most of the PBP points are excellent advice and would make the Perl world better and a few really just aren't but all of it is worth thinking about."

We have no standard at my workplace and I've only ever been in one shop that did (via a perltidy hook on commits). Currently we have a handful of solid hackers who have some disagreements about readability issues, etc. We do the "right thing." Don't futz with code style for the sake of your preferences; fit in with what you're working on. Do new stuff how you please with at least some consideration of maintenance for the next sucker hacker.

TheDamian is 10x the hacker I am but some of the advice is subjective and even silly. sub something{ is no better than sub something {. I adore unless and any construct that makes a line of code read naturally (unless(){}else{} is much less natural than do_this unless that). Inside-out objects are a waste of cycles unless you have one of the exceptionally rare real/defined need for them (client code hooks at a bank, for example). Contextual::Return is… a really cool idea and might have some Devel applications but I'm grateful I haven't encountered in a maintenance situation. The book pre-dates Moose.

The main thing I'd argue Perl has going for it versus most other languages for maintenance is its introspection and testing tools. Basic testing with Perl is trivial. Crazy/difficult testing is at least possible. Requiring all new code to be submitted with a peer reviewed test file and to pass a coverage (test and Pod) test and would probably do more for your shop's sanity than a style guide. It is also more objective than a style-guide--which is likely to contain at least a few arbitrary choices for the sake of standardization--so it could go down easier where personal feelings might otherwise cause resistance.

(Update: typo fixed.)


In reply to Re: Seeking Best Practices - does your company follow a standard? by Your Mother
in thread Seeking Best Practices - does your company follow a standard? by meraxes

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.