Well it failed in 5.6, so I sent the bug report in and got a reply. Apparently it is a known bug, a CPP comment will fail in an eval if it is on the first line, so you just have to make your first line blank. merlyn had simply forgotten about that bug.

OK, with that amusing gotcha out of the way, I think that this is incredibly nice to have. Until it was forcibly pointed out to me what you would want to use it for I didn't see the point, but now I do and I will use it. :-)

On a side-note, I complained to merlyn that I remembered the days when I never saw bugs in Perl. Then I found out about some, but never worried about it much. Then I started hitting them myself. He tells me that he has never been bitten by a Perl bug. He knows about them, but has never been hit.

I suspect our definitions may differ though... Here is my guess as to merlyn's definitions. Any bug in a development version does not really count. Any version that breaks stuff merlyn really cares about clearly is a development version. And the stuff that merlyn cares about is a pretty good test suite for what merlyn actually does. Therefore essentially by definition, he will never be bitten by bugs in Perl.

VBG

UPDATE
I have just been told that this bug is fixed in bleeding edge versions of Perl and will be fixed in 5.6.1. :-)


In reply to RE (8): How to tell eval where the code is from by tilly
in thread How to tell eval where the code is from by Yaakov

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.