This is a fine module. It has one caveat that the author understands, but doesnâ€™t call out in the documentation: unlike real constants, the deferred constants produced by this module wonâ€™t be inlined in any code that is compiled before the deferred calculation has been triggered. So depending on why you are using constants instead of other mechanisms like read-only variables, this module may or may not be of use to you. This is a fundamental caveat; it is not possible to resolve without special support in the compiler and op tree.
(As for Burak GÃ¼rsoyâ€™s negative review, please ignore. He criticises that this module injects weird subs â€“ in Perl, all constants are subs of a particular form (cf. the source of constant.pm). He also criticises the use of goto â€“ in Perl, goto has several forms, one of which provides an explicit tail call, which form is quite commonly used, particularly in all sorts of meta-programming. I found nothing surprising or unusual in my reading of the moduleâ€™s source.)
This if to offset the very negative previous review
given by someone who seemingly adopted an attitude
"if I don't understand it, it cannot be good".
I've never used the module in question myself,
but the docs are reasonably complete, and the code looks clean and tidy. The deferral approach is sane, too.
1 hidden unhelpful review