in reply to Universal test flag
package Foo::Bar; use constant DEBUG => $ENV{DEBUG_FOO_BAR}; # ... warn "I'm being tested!" if DEBUG;
Then if you need a particular class to be debugged, set the appropriate environment variable to "1" before the class is loaded.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Universal test flag
by ait (Hermit) on Jul 17, 2012 at 13:23 UTC |