Don't ask to ask, just ask | |
PerlMonks |
Re^2: Balancing Logging and Code Readabilityby saberworks (Curate) |
on Sep 15, 2009 at 15:36 UTC ( [id://795411]=note: print w/replies, xml ) | Need Help?? |
Another common thing to accomplish something similar is to declare a vprint() or vwarn() function and have the check for DEBUG only occur there (instead of all over the place in your code). Then you just vprint("debug stuff") everywhere. Still doesn't get rid of the clutter but it ends up being a bit less than trailing if DEBUG everywhere.
In Section
Seekers of Perl Wisdom
|
|