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.
In reply to Re: Universal test flag
by tobyink
in thread Universal test flag
by ait
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |