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

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

Thread Previous | Thread Next
Nick Ing-Simmons
October 31, 2001 09:50
Re: [PATCH] core-only patch for clamp/readonly hashes
Message ID:
Jarkko Hietaniemi <> writes:
>> Hmm, then I think what I have been calling READONLY is what you have
>> labeled restricted above.
>No wonder we have been jostling about the nomenclature, then...
>The problem is finding a word that describes that one can add
>*or also delete*, but only within the set of allowed keys.
>Or should we even separate the add and delete rights?
>               add     delete  add     delete  access
>               old     old     new     new
>RWD             -       -       -       -       +
>RW              +       +       +       -       +
>RD              +       +       -       +       +
>RWD             +       +       +       +       +
>Hey, this is starting to look like an ACL system...

And my proposal is not as complicated as an ACL system it is more akin
to the (inverse) of 'w' 0200 bit in UNIX.

As the 'w' bit occurs on both directories and files, so the
SvREADONLY can occur on both the hash and the value(s) it contains.

directory  file                                  hash       value
   rw-     rw-       Can do anything              --          --
   rw-     r--       Cannot change file           --          RO
   r--     rw-       Cannot delete/add file       RO          --
   r--     r--       Can only read file           RO          RO

The analogy is not perfect because it is proposed one can delete things
from a "restricted" hash.

Nick Ing-Simmons

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