On Wed, Nov 6, 2013 at 12:58 AM, Kent Fredric <kentfred...@gmail.com> wrote:
> These 5 tasks seem rather obscure to me, and I don't understand what > they're claiming to do. > an interface simply defines the methods a class must perform, see Interface Segregation Principle. A class is a definition for an object instantiation. > 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:: > obviously in the context of RBAC I'm not talking about extensions (or at least I thought that was obvious) > * 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" > but how do you distinguish between Role as in "Role Based Access Control" and Role as in "Perl Role" To me in such a system (or perhaps Interface::RBAC, which namespace is first is rather arbitrary, contents contain only requires qw( ) and maybe arounds that have method signature validation ) (the original question which was on of the Interface:: namespace, would be presumably used for interfaces that could easily be globally interesting and could/would/should live outside of implementing dists, e.g. interface separation for PurePerl vs XS ) RBAC::Interface::Role RBAC::Interface::User RBAC::Interface::HasRoles ( normally I'd use the world Role instead of Trait, but RBAC::Role::Role seems really confusing) RBAC::Trait::User RBAC::Trait::Role RBAC::Trait::HasRoles # implements the respective "Perl Roles" above RBAC::User - actual class RBAC::Role - actual class -- Caleb Cushing http://xenoterracide.com Calendar: https://www.google.com/calendar/embed?src=xenoterracide%40gmail.com&ctz=America/Chicago