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
In reply to Re: Re: Module Readonly
by hardburn
in thread Module Readonly
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |