in reply to Best practice for handling subroutines that are conditionally loaded?
...if the tests are all at one place, why not put them inside the same conditional if ($ENV{MYMOD_DEBUG_LEVEL}){...} ?
Even better why don't you refactor the tests into a separate module which is used if ?
You could even put the essential use Module there as long as you run it inside the same package
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Best practice for handling subroutines that are conditionally loaded?
by nysus (Parson) on Mar 08, 2024 at 15:08 UTC | |
by LanX (Saint) on Mar 08, 2024 at 15:19 UTC | |
by nysus (Parson) on Mar 08, 2024 at 15:28 UTC | |
by nysus (Parson) on Mar 08, 2024 at 16:03 UTC | |
by jo37 (Curate) on Mar 08, 2024 at 16:44 UTC |