On 6 November 2013 19:28, Caleb Cushing <xenoterrac...@gmail.com> wrote:
> As sort of an extension to this problem, how would you name the following > Perl Roles within a Bounded Context of RBAC (also known as why I hate the > name Role and wish Perl 6 had just used Trait) > > * role that defines a role object interface > * role that defines a user object interface > * role that defines an interface if an object can have roles (e.g. users > have roles, roles have roles ) > > * class that is a role object > * class that is a user object > These 5 tasks seem rather obscure to me, and I don't understand what they're claiming to do. Though in the general sense, if you're creating things that are general purpose plumbing for the very mechanics of Roles themselves, then a Role:: prefix seems sensible. If they're only applicable to Moo or Moose, then they'd be MooseX::/MooX:: > * a role that implements the core functionality required for a role, such > as grant/revoke permission, name, check access > * role that provides the actual user object behavior > * role that provides the behavior of objects that can have roles > These specific requirements sound like they'd need other classes to implement the behaviour, and the roles themselves would not be sole components, simply glue for the behaviour. Here, I'd think an AccessControl base of some kind would be useful, and then subscribing classes would be something like with "AccessControl::Role::PerUser" -- Kent