You don't seem to agree, but I really think that posting on PerlMonks comes with some responsibilities: as with every printed medium, you don't know who is going to read the posts (nor when), and you have no way to correct them if they think that index and substr are a proper way to process XML. Posting code with a bad design is no different from posting broken code. In fact I would think that it is even worse, as unsuspecting readers can try it out, see that it works and use it as a base for their own code.

These snippets are similar in a way to those countless attempts at parsing CGI parameters: this is just not the way to do it. Use CGI, use XML::Parser and its friends.

Just to show you the effect of your posts: imagine a good Perl programer browsing the snippets through the PMSI, looking for a way to get started with XML: this is what they get... I don't think you are doing him/her a service!

You can of course think different (of course you do ;--), but I thought it was important to add a correction after your snippet (and a -- vote).

As for the fact that you already posted a proper version of those tools... well, I just hadn't realized that podmaster is really crazyinsomniac in disguise ;--)


In reply to Re: Re: Re: parse the "Other Users XML Ticker" with index and substr by mirod
in thread parse the "Other Users XML Ticker" with index and substr by PodMaster

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.