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

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

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
October 31, 2001 09:50
Subject:
Re: [PATCH] core-only patch for clamp/readonly hashes
Message ID:
20011031175022.13102.1@bactrian.elixent.com
Jarkko Hietaniemi <jhi@iki.fi> 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
http://www.ni-s.u-net.com/



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About