I just wrote some code that looks like this:

my @logs = <LOGFILE>; chomp @logs; #XXX: map { &mung_log_entry($_) }, @logs;

Now, this isn't really the same kind of "commented-out code in production" that we've been arguing about; it's more of a pseudocode comment to tell me that I've been thinking about munging up each log entry after reading them all in. In this case, I think that writing the comment as "code" is more legible (mostly in that it doesn't break up the flow of code on the page) than writing in a little note in prose:

my @logs = <LOGFILE>; chomp @logs; # Mung up each log entry?

Eh. Matter of opinion, I guess. I think that the "code" comment more accurately conveys what I was thinking at the moment (even if it is an Evil Use of map In A Void Context -- hey, I said it was pseudocode).

Update:Yes, foreach would be clearer than map, but I've been thinking in terms of map lately.

--
:wq

In reply to Re: Commented out production code? by FoxtrotUniform
in thread Commented out production code? by t'mo

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.