rootcho has asked for the wisdom of the Perl Monks concerning the following question:
then in my code I have alot of :sub say { print "$_\n" for @_; } sub debug { my ($msg,$lvl) = @_; say $msg if $lvl && $DEBUG{$lvl} } sub debug_lvl { map $DEBUG{$_} = 1, @_ }
The question is ? Is there a way to prune the debug() call at all when I've not activated debug mode.debug "this...", LVL1; ... debug "that ..", LVL3;
will this remove the code when DEBUG constant is not set ?DEBUG and debug "text..", LVL1 ;
|
|---|