Try Scalar::Readonly. It's a tiny module, and variables made readonly with it are significantly faster than those of Readonly (because the latter uses the relatively slow tie mechanism).
But note that readonlyness can just as easily be turned off again, because the module just toggles Perl's internal readonly flag. In other words, it's not the right tool to keep intentional evildoers from messing with your variables...
In reply to Re: How do I initiate a constant with variable value?
by almut
in thread How do I initiate a constant with variable value?
by accessdenied
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |