croak "WTF? You gave me a nested array for the type of '$name'?!?" ... croak "Can't grok type specifier '$type' for member '$name'";

Please, please, please do not be glib or flippant or obscure when you're phrasing diagnostic messages. Diagnostic messages are where you should put on your best interpersonal and technical communication skills.

(The best diagnostics say what the program was trying to do, where in the code it was trying to do it, what the program got, and what the program was expecting. That's all.)

To a lesser degree, comments in the code should also be informative without being too informal. Your code is a mode of your personal expression, and a few well-placed mutterings about your thoughts may guide the reader, but if the tone sounds too informal, it can get in the way of a useful code review or bug hunt.

This is a personal preference, but one which is tempered by having to work with source code from many authors over a long career with many people with different personalities and from many different cultures.

--
[ e d @ h a l l e y . c c ]


In reply to Re: Suggestions for a new module by halley
in thread Suggestions for a new module by Stevie-O

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.