in reply to Best practice for handling subroutines that are conditionally loaded?
Not really part of what you're asking; however, I'd question the naming of some of the symbols you're exporting. Some general pointers:
For your specific question, could you set up a Test::Utils::Dump::Noop whose debug routines have the same names as those in Test::Utils::Dump but are NO-OPs. Your test script(s) could then have something like:
use if $ENV{MYMOD_DEBUG_LEVEL}, 'Test::Utils::Dump' => ':debug'; use if ! $ENV{MYMOD_DEBUG_LEVEL}, 'Test::Utils::Dump::Noop' => ':debug +';
— Ken
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Best practice for handling subroutines that are conditionally loaded?
by nysus (Parson) on Mar 08, 2024 at 21:15 UTC |