in reply to Re^2: Calling splice() on Immutable Arrays
in thread Calling splice() on Immutable Arrays
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 ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Calling splice() on Immutable Arrays
by SankoR (Prior) on Jul 14, 2016 at 13:40 UTC | |
by BrowserUk (Patriarch) on Jul 14, 2016 at 18:13 UTC | |
by shmem (Chancellor) on Jul 15, 2016 at 09:49 UTC |