most of us have used code like this:
use constant DEBUG => 1;
use constant SOMETHINGELSE => 'key';
This looks fine. However, let's look at this quote from perlsub
Subroutines whose names are in all upper case are reserved to the Perl
core, as are modules whose names are in all lower case. A subroutine
in all capitals is a loosely-held convention meaning it will be called
indirectly by the run-time system itself, usually due to a triggered
event. Subroutines that do special, pre-defined things include
"AUTOLOAD", "CLONE", "DESTROY" plus all functions mentioned in perltie
Now, we all know that constant.pm
translates constant names into subroutines... The question is: do we violate Perl conventions by using upper-case constant names? Is that one of those cases where syntactic sugar hurts?
Update: The question has been answered here.