in reply to using warn instead or print STDERR?

Another alternative to consider is Smart::Comments. Keep in mind that this module is categorized thusly, according to the author in his Categorized Damian Modules node:
Damian modules that are specifically debugging and coding aids and which Damian uses himself during code development
  • Comment on Re: using warn instead or print STDERR? (Smart::Comments)

Replies are listed 'Best First'.
Re^2: using warn instead or print STDERR? (Smart::Comments)
by leocharre (Priest) on Feb 27, 2009 at 21:11 UTC
    Damian Conway rocks. Smart::Comments rocks.

    Two problems. Well.. not problems but peculiarities.

    1) You can't turn off Smart::Comments at runtime because it's a code filter. So you can't turn if off and on via the cli, or from another package :-(
    You use it, or you don't. Yes, you can turn it off at certain places- but my point is, it's hard coded.

    2) Makes your shiznit run a little tiny weensy bit slower.

    I still love Smart::Comments- I use it a ton in my test suites, then just disable them or whatever when it goes to production.

    It's just sometimes I need to call forth all that the (installed/production) code can tell me about what the hell is going on in there-(although most of the time I don't need to know the count of rice grains that carp had with his thai food). And Smart::Comments is not a good choice for that.