On Fri, Jul 20, 2001 at 09:09:56AM +0100, Nick Ing-Simmons wrote: > Jeffrey Friedl <jfriedl@yahoo.com> writes: > >[non-list reply] > > > >Nick Ing-Simmons <nick@ing-simmons.net> wrote: > >|> - why do we need new flag rather than SvREADONLY ? > > > >As I mentioned in the original post, clamping is different from readonly. > >It seems to me that a readonly hash would mean that no changes would be > >allowed at all, including to its values. > > The writability of the values could/should be controlled by the > SvREADONLY bit of the value SVs. > > Thus to get "clamp" just set flag on HV, to really lock it down > set it on the values then set on HV. > > > >(Which would be a nice feature as > >well, and even moreso, it would imply that we could then have readonly > >scalars.) > > We can already. What is needed is an interface - as a module ;-) > > I am willing to put hooks into the core to get croaks when > a READONLY hash is accessed. > FWIW, I agree with Nick entirely. Tim.Thread Previous | Thread Next