Yes, you've found a bug... with Recently Active Threads. It doesn't deal with empty titles usefully (they result in a link with no title text, which most browsers simply ignore while some just make them nearly impossible to see or follow).

I find such problems much worse than the many, many places where PM treats '0' that same as ''.

Some of these places I like more than others. For example, we recently added another case of this "bug" so that [0] renders as [0], not a link. While the chatter one is not as easy to like.

But we went years without anyone appearing to even notice this CB 'feature', so the downside is very small. Perhaps we even saved ourselves from some sloppy client code that sent message=0 when no message was desired. (:

The fact is that treating '0' like '' is so much simpler in Perl and often results in code that handles '' and undef values better than is easy to do while allowing '0' through.

So I'm not exactly opposed to 'fixing' the 'bug' that prevents '0' from being chatted. But I'm certainly not in a rush to do it and I won't mind if it is never fixed. And I'm against starting a hunt to search out the tons of similar places and add the extra complexity to the code to try to treat '0' differently while hoping to not break the handling of empty and undefined strings.

Sure, it isn't rocket science, but ignoring '0' is usually less troublesome than getting the other cases wrong. So I mostly look at it as a very Perlish quirk and thus very appropriate on this particular website and I'll likely continue to be fairly cavalier with mistreating '0' this way in PerlMonks code, while reducing code complexity. And continue to be amused and not annoyed when I discover more places here where that happens. :)

- tye        


In reply to Re^2: 0 (bug) by tye
in thread Chatterbox bug by Limbic~Region

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.