and that's the reason I prefer Readonly instead. The constants end up being perl variables that you can't change. I find $SomeConstant more obvious than SomeConstant().
... but maybe that's just me.
| [reply] [d/l] [select] |
Well, if you do it properly (i.e. use BEGIN {} in this case), you don't need the parens (except in some rare cases where disambiguation is needed), and you have the added performance benefit of the subroutines being optimized away.
Of course you can't interpolate subroutine calls in double quoted strings... which is a clear disadvantage if constant. But Readonly, OTH, is slow (because it relies on tied magic), and may occasionally cause other strangeness (for an example, see runtime problem; elusive error).
| [reply] [d/l] |