Subject: | Make complex data structures immutable |
If you use Const::Fast and define a constant as an arrayref or hashref, it will make the whole
data structure immutable.
I think it would be handy if the constant pragma did this. Then you could:
use constant HASHREF => { a => 1, b => 2 };
and then do HASHREF->{a} and know that it's immutable.
You can do the above now, but you can change the contents of the referenced hash.