You cannot check all hash accesses at compile time. Therefore, fields must do many things at runtime. Therefore, it must have a runtime component. I suggested using tie. lock_keys() is a perfectly good other solution. tie has the added benefit of being able to do other things than just restricting keynames. YMMV.
My criteria for good software:
Does it work?
Can someone else come in, make a change, and be reasonably certain no bugs were introduced?