in reply to Debug flags
If you are worried about overhead, you can do something like
Here the function call and if check are optimized away when not debugging, leaving only a very small statement stub.# at the top use constant DEBUG => $ENV{DEBUG}; ... # later printDebug("some message") if DEBUG;
|
|---|