Array-Lock
view release on metacpan or search on metacpan
sugests that a range is desired, a hack of some sort may be possible.
unlock_indexes(@array);
Removes the restriction on the array's indexes.
=cut
sub lock_indexes (\@) { Internals::SvREADONLY @{$_[0]}, 1; }
sub unlock_indexes (\@) { Internals::SvREADONLY @{$_[0]}, 0; }
# You cannot lock a specific index, because of shift...
# I guess, you could lock that one index, and allow all the other
# indexes _above_ it to be usable... should I do that?
=item lock_value
=item unlock_value
lock_values (@array, @indexes);
lock_values (@array);
unlock_values (@array, @indexes);
( run in 0.600 second using v1.01-cache-2.11-cpan-702932259ff )