constant-defer reviews

cpanratings
 

RSS | Module Info | Add a review of constant-defer

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

Aristotle Pagaltzis - 2009-11-02T21:29:38 (permalink)

3 out of 6 found this review helpful. Was this review helpful to you?  Yes No

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.

Grrrr - 2009-10-31T03:16:26 (permalink)

5 out of 8 found this review helpful. Was this review helpful to you?  Yes No
1 hidden unhelpful review