While perusing Perl::Critic::TODO, I found a request for the ability to detect "obnoxious" comments, where the description given is "Prohibit Excessive Hash Marks", e.g.:
#### This is a loud comment ####
Being a bit anal-retentive on such matters, I try to make my code as elegant as possible, and would like to avoid behaviors that are "obnoxious". So I'd like to understand, what is obnoxious about a "loud" comment, if used in moderation? For context, I have only been working in Perl for about 7 years, but at this point it's my language of choice professionally, and it's not unusual for me to compose thousand-plus line files of documented code* as part of a multi-man-week project. In said projects, I delimit my functions as explicitly as possible so that the reader can scan them more quickly, e.g. :
################################################### =head1 Foo method The foo() method converts a fromitz into first-normal form, and returns the result. =cut sub foo { my ( $fromitz, $word_order ) = @_; # ... code here ... return $result; } # foo ###################################################
Are strings of hashmarks "obnoxious"? Or just when you embed them into the middle of a function, so it impedes the flow?

Update, 10-Sep-2007:

Not wanting to take myself too seriously on this, I have initiated a poll quest (Re: poll ideas quest 2007).

* Large files happen because of large object classes, since I try to stick to "one file, one module, one class".

* Update 22-Feb-08 - removed the prototype from my example. Please retest any code you have that uses it, as its behavior may have changed. :)


In reply to What makes a comment "obnoxious"? by papidave

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.