I haven't seen a logical reason why Perl shouldn't throw an error if the alias to a ref is overwritten.
My suspicion is that the ugly truth is that the readonly flag is (mis)used for indicating if the referenced data structure is "constant" not the reference itself.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re^4: Shouldn't references be readonly?
by LanX
in thread Shouldn't LITERAL references be readonly? (updated)
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |