Tried so many times so I forgot to mention additional requirements, sorry.
I don't like using getter because there are several scripts which uses module and several modules also, so number of getters and calls to them becomes big. Calls costs time and my task is optimisation so I would like to avoid getters.
By the way, I found that constants in Perl actually implemented by subs, so each mention of constant is actually call to sub which returns value. As for me this looks like having getters. So, looks like I don't need constants really. I need some way to define readonly object without use of additional modules and other time-spending things.
In reply to Re^2: How do I initiate a constant with variable value?
by accessdenied
in thread How do I initiate a constant with variable value?
by accessdenied
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |