Wouldn't that be a runtime error? After all, the hash isn't even locked until lock_keys is executed at runtime.
Also, I think there is no performance penalty (except to the call to lock_keys), since I believe all lock_keys does is set the read-only flag on the hash, which is checked regardless of whether you've set lock_keys or not.
In reply to Re^2: strict "vars" mode for hash key literals?
by ikegami
in thread strict "vars" mode for hash key literals?
by perlancar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |