FAQ
First: what Damian said.

Second: Whatever syntax people come up with has to make it easy and
type-safe to name particular combinations of those bits.

In other words, you should be able to make a bitset with Unix-style
permissions:

OTHER_EXECUTE
OTHER_WRITE
OTHER_READ
GROUP_EXECUTE
GROUP_WRITE
GROUP_READ
...

But still be able to make bitmasks (ignore the syntax here):

OTHER_MASK = OTHER_READ +| OTHER_WRITE +| OTHER_EXECUTE;
GROUP_MASK = GROUP_READ +| GROUP_WRITE +| GROUP_EXECUTE;
...

These bitmasks should be properly typed with respect to the original
bitset; which is to say, this should work:

my Permissions $other_perms = $file_perms +& OTHER_MASK;


-'f

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 17 | next ›
Discussion Overview
groupperl6-language @
categoriesperl
postedApr 7, '10 at 3:31a
activeApr 8, '10 at 4:17a
posts17
users8
websiteperl6.org

People

Translate

site design / logo © 2021 Grokbase