I think this is an improvement over the last. However, I really don't like the automatic importing of so many functions, particularly enter, leave and caught. I really think those should be optional. Consider the potential confusion of using this module next to Exception::Class which might be using it's own caught method! There's no real reason why you can't support variations like this:

use Log::Painless qw( :ALL ) { %opts }; use Log::Painless qw( :STD ) { %opts }; use Log::Painless qw( :NONE ) { %opts }; use Log::Painless qw( debug info ) { %opts };

It's fine to have your own import, but it would be great -- even if you automatically import a few functions -- to allow users to turn that off if they want.

Also, while a minor point, I'd rather see the Pod follow a more standard format, with the abstract describing the module, not the document, with the synopsis being just a short amount of code, and what you wrote in the synopsis being retitled to "Description" or "Usage".

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.


In reply to Re: RFC: Log::Painless by xdg
in thread RFC: Log::Painless by radiantmatrix

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.