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";
In reply to Re: Best practice for handling subroutines that are conditionally loaded?
by etj
in thread Best practice for handling subroutines that are conditionally loaded?
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |