constant-defer reviews

RSS | Module Info

constant-defer (2) ****

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 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.)

constant-defer (2) *****

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