in reply to inlined DEBUG constant versus $DEBUG
Here's an idea:
sub say { print "$_[0]\n"; } sub moan { print STDERR "WARNING: $_[0]\n"; } sub mutter { print "debug: $_[0]\n"; } if (!$DEBUG) { eval "sub mutter { }"; }
Then the code reads well too :-)
|
---|