in reply to Re: Module Readonly
in thread Module Readonly

constant creates a subroutine, which in Perl5 is global to the package. You can fake lexically-scoped subroutines by putting them in a variable (my $sub = sub { . . . };), but that doesn't really help with constants since you can still change the variable that holds the sub ref.

----
: () { :|:& };:

Note: All code is untested, unless otherwise stated