develooper Front page | perl.perl5.porters | Postings from October 2001

Re: [PATCH] core-only patch for clamp/readonly hashes

Thread Previous | Thread Next
Jarkko Hietaniemi
October 31, 2001 07:13
Re: [PATCH] core-only patch for clamp/readonly hashes
Message ID:
> >+=item Can't access nonexistant key {%s} of readonly/clamped hash
> That "clamped" word has IMHO got to go ...

How about "restricted"?

> frozen makes a little more sense perhaps but I am still unclear what the
> specification is. Author and I yesterday described what semantics
> of SvREADONLY would be. We did not describe what "frozen" would be.
> I still don't understand the semantics of "frozen".
> Please describe the semantics of "frozen" (don't used the clamped word)
> explaining how it differs from READONLY.

If I got it right: at the moment of "restricting" the hash the keys
that exist become the only allowed keys.  No new elements with new
keys can be added.  Existing elements can be deleted, though (and
there the "magic marker" is used), and the elements can be added back.

This is a subset of READONLY, in that with READONLY *no* changes
are allowed.

                add     delete  add     delete  access
                old     old     new     new
READONLY        -       -       -       -       +
restricted      +       +       -       -       +
normal          +       +       +       +       +

$jhi++; #
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About