It's much much simpler than that:
use constant haveMod => $mod::VERSION; print haveMod ? "goodMod" : "badMod";
In reply to Re: constants wont optimize
by ikegami
in thread constants wont optimize
by patcat88
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |