Think about Loose Coupling | |
PerlMonks |
Re^2: Using perl module if env is enabledby tobyink (Canon) |
on Dec 09, 2019 at 16:07 UTC ( [id://11109883]=note: print w/replies, xml ) | Need Help?? |
A constant is usually better than a variable:
At it means that the if (...) stuff will be optimized away entirely when it's false. Also it will protect against $HAVE_XYZ being accidentally changed half way through running the process. (Of course, sometimes you do wish to start using XYZ later on by changing the variable, but that's probably less common.)
In Section
Seekers of Perl Wisdom
|
|