in reply to Best practice for handling subroutines that are conditionally loaded?

For each routine in Test::Utils::Dump couldn't you just do something like:
sub d0 { if($ENV{MYMOD_DEBUG_LEVEL} >= $my_level) { doThis; } else { doThat; } }
In general, it might help to name your routines with a common tag so they are easy to find. For example my_debug_d0.
  • Comment on Re: Best practice for handling subroutines that are conditionally loaded?
  • Download Code