go ahead... be a heretic | |
PerlMonks |
Re^3: Calling splice() on Immutable Arraysby BrowserUk (Patriarch) |
on Jul 13, 2016 at 23:21 UTC ( [id://1167744]=note: print w/replies, xml ) | Need Help?? |
A quick look at the source (pp_splice() in pp.c), shows that it doesn't check the state of the readonly flag. a simple 1 or two line patch should fix it. That said, I cannot remember the last time I accidentally modified the contents of an array I didn't want modified, so it's a moot point as far as I'm concerned. Indeed, if some module or api gave me an array that was readonly and I wanted to modify it, I'd just turn the flag off and do it anyway. This certainly isn't anything that would stop me from replacing the use of Readonly if I encountered its use in some module I wanted to use. But different folks ... With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|