in reply to How do I initiate a constant with variable value?
What I'm trying to do is having some object which is defined in the module and which can be used from script which uses this module but in readonly mode.Uhm, what's a "read-only object"? Note that objects are references, and even if you make the reference read-only, you can still access (and modify (unless that itself has been made read-only)) whatever it's pointing to. So, if you have a traditional, hashref based object, make the reference "constant" or "read-only" doesn't mean the objects state is suddenly unmutable.
|
|---|