in reply to Best practice for handling subroutines that are conditionally loaded?
The benefit is that constant-folding means that if it's not in debug mode, the Perl interpreter will simply optimise the debugging code out entirely.use constant DEBUG => $ENV{MY_DEBUG}; # ... DEBUG and print "something\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Best practice for handling subroutines that are conditionally loaded?
by Bod (Parson) on Mar 09, 2024 at 22:06 UTC |