I would like to extend this with a request from a module maintainer: when sending a bug report the easiest for me (and I suspect for other module authors too) is to have a self-contained script, with the data in the __DATA__ section:

This is an example of a great bug report I received a while ago:

This code works fine: -------->8-------->8-------->8-------->8 use XML::Twig; $twig=XML::Twig->new(#keep_encoding=>1, twig_handlers=>{ '[@a]' => sub {warn "a handler\n"}, }); $xml=join ('', <DATA>); $twig->parse($xml); __DATA__ <?xml version="1.0"?> <!DOCTYPE doc SYSTEM "dummy.dtd"> <doc> &ent1; <elt1 a="Y"/> </doc> -------->8-------->8-------->8-------->8 and generates: a handler However, if the keep_encoding is uncommented, then it produces this er +ror: Can't use string ("ent1") as a HASH ref while "strict refs" in use at +/local/share/oed/lib/perl/XML/Twig.pm line 1251, <DATA> line 6.

With this I can just save the code and start working on the problem.

Even better is a report where the code can be used asis as a non-regression test (I have no example of this but it has been known to happen).

The exact environment is also very important. This includes the OS and the version of Perl, but other factors can be just as important: for XML::Twig (just a random example ;--) the version of XML::Parser and of libexpat are needed.

Oh, and patches are welcome too ;--)


In reply to Re: On making bug reports (For both perl and non-perl software) by mirod
in thread On making bug reports (For both perl and non-perl software) by Elian

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.