The fix is to throw another BEGIN around the part that sets the constant. I would like to know why it works.
eval is a runtime operation. Sub declaration is a compile time operation. BEGIN does nothing to change that unless you use a BEGIN to perform the runtime eval before the compile time declaration occurs.
All of the operations within a single BEGIN block occur, with respect to each other, in the order they would occur if not for the BEGIN block.
In reply to Re^3: constants wont optimize
by chromatic
in thread constants wont optimize
by patcat88
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |