On Sat, Apr 28, 2012 at 09:54:31PM -0500, Jesse Luehrs wrote: > Which makes me wonder why SvREADONLY is exposed to perl-space at all. > It's not like it even keeps Hash::Util from needing XS. Wouldn't it make > things a lot easier to follow if Internals::SvREADONLY was removed in > favor of just adding a few bits to ext/Hash-Util/Util.xs? I think Hash::Util would be easier to read if it better encapsulated the unfortunate fact that it overloads the use of SVf_READONLY to mean a locked hash, by putting the relevant necessary C-level manipulation into one well- named place in its XS code. Yes, constant.pm is (currently) using Internals::SvREADONLY(), but for the "conventional" purpose (a read only scalar value). That's unfortunate. I wonder how to fix that. I'm even wondering if it's actually necessary for constant.pm to do that, or if it's just a "nice to have". (In that, nothing relies on enforcement of not being able to manipulate references in the symbol table. It's not like it can't be worked round) Nicholas ClarkThread Previous | Thread Next