Fellow Monks!

In an ideal world what kind of built-in debugging features would you like a module to have?

At the moment I'm working on an RSS module (XML::RSS::Tools), and I'm pretty sure it's near completion. During the development phase I have tended to scatter print statments throughout it to see what is going on, but now I'm looking at enabling proper end-user debugging information.

I've used some modules that dump staggering amounts of data to STDERR, and I've seen some that do pretty much nothing. I know there is the sophisticated Log4perl and simple Carp warn option. But which do people actually prefer?

My module is OO, and has a method to set a debug level, and read the level, and it's possible to dump the internal state of the module at various steps manually from the interface, but at the moment turning debugging on, doesn't actually do anything!

As I recently asked I don't want to bloat the module, When is a feature bloat?, but I think a debug option can be useful. This module interacts with data feeds that are outside the users control, so I think it's useful to debug things when you don't get the result you expect: XML::RSS; Using RSS; How do I clean RSS feeds to make them usable?; and Why so slow from CGI, but not command line?.


--
ajt

In reply to What kind out output would you want from a module's Debug option? by ajt

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.