Problems? Is your data what you think it is? | |
PerlMonks |
Re^9: Shouldn't references be readonly? (updated)by ikegami (Patriarch) |
on Aug 09, 2020 at 07:12 UTC ( [id://11120514]=note: print w/replies, xml ) | Need Help?? |
Note that assigning to certain "unassigned scalars" is legitimate, such as the one returned by substr. Unassigned scalars with set magic simply wouldn't be made read-only, of course. But you know what else wouldn't be made read-only? "Unassigned scalars" from XS code. Making unassigned scalar *created by Perl* read-only would create inconsistencies with those created by XS code. This reduces the benefits of making any change.
In Section
Seekers of Perl Wisdom
|
|