Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

On making bug reports (For both perl and non-perl software)

by Elian (Parson)
on Dec 02, 2002 at 18:46 UTC ( [id://217017]=perlmeditation: print w/replies, xml ) Need Help??

I've noticed a number of perl bugs being found, reported, and worked out lately, both on perlmonks and elsewhere. (Usually usenet is the elsewhere, but isn't it always?) This is a good thing--perl, like all software, has bugs in it, and they need identifying. Many of the threads on PM result in reports to p5p via perlbug. This is also a good thing, as it's tough to fix a bug you've not been told about.

Unfortunately the bug reports have often been... sparse. A mildly descriptive subject (which is fine) and a bug report that reads "See the discussion on perlmonks, at http://...". This, unfortunately, is bad.

When making a bug report, the report itself needs to have enough information in it to reproduce the problem. Someone should, while completely off-line, be able to read the bug report and (hopefully) do something about the bug. Putting a link to extended discussion on the problem in the report is fine, but the report itself should be sufficient to work with.

If that information's not handy, the bug is much less likely to be looked at. Following the link, when it's not even clear (because of insufficient information in the report) that there even is a bug, is enough extra work that far fewer people are likely to look at the bug, and the fewer eyes the lower likelyhood that the bug will be fixed.

  • Comment on On making bug reports (For both perl and non-perl software)

Replies are listed 'Best First'.
Re: On making bug reports (For both perl and non-perl software)
by mirod (Canon) on Dec 02, 2002 at 19:40 UTC

    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 ;--)

Re: On making bug reports (For both perl and non-perl software)
by hossman (Prior) on Dec 03, 2002 at 01:53 UTC

    The output of perl -V from the machine that had the problem should be included with any bug relating to perl.

    I've allways thought it would be great if there was a "perl -VV" that also included info on all of the installed perl modules, including version number, and for each of those modules that have "non perl dependancies" (ie: native libraries) the versions of those dependancies ... so that when included in a bug report, everything would be very clear.... "Hmmm, this person is getting a bug in my code when I walk the XML tree ... they are using 5.8.0 on Debian Linux, with XML::Parser version v1.5.1, which is using libxerces-1.1.so installed from .deb ... interesting, I should try that configuration."

Re: On making bug reports (For both perl and non-perl software)
by dingus (Friar) on Dec 03, 2002 at 10:28 UTC
    Perhaps you should think about making a perl version of the Mozilla/Bugzilla Bug Writing Guidelines

    Dingus


    Enter any 47-digit prime number to continue.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://217017]
Approved by Ovid
Front-paged by Juerd
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-19 22:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found