Entities::Backend - A role providing storage for the Entities user-management/authorization system.
version 0.5
use Entities; use Entities::Backend::SomeBackend; # see synopsis at L<Entities>
This class defines a Moose role that is to be consumed by backend classes that provide storage for the Entities user management and authorization systems. It defines a list of required methods that every class that consumes this role must implement.
The following method are required by any class consuming this role:
Receives an ID for a user entity and attempts to find it in the backend. If found, returns an Entities::User object representing that user. Returns a false value if the user was not found.
Receives a username for a user entity and attempts to find it in the backend. If found, returns an Entities::User object representing that user. Returns a false value if the user was not found.
Receives the name of a role entity and attempts to find it in the backend. If found, returns an Entities::Role object representing that role. Returns a false value if the role was not found.
Receives the name of an action entity and attempts to find it in the backend. If found, returns an Entities::Action object representing that action. Returns a false value if the action was not found.
Receives the name of a plan entity and attempts to find it in the backend. If found, returns an Entities::Plan object representing that plan. Returns a false value if the plan was not found.
Receives the name of a feature entity and attempts to find it in the backend. If found, returns an Entities::Feature object representing that feature. Returns a false value if the feature was not found.
Receives the name of a customer entity and attempts to find it in the backend. If found, returns an Entities::Customer object representing that customer. Returns a false value if the customer was not found.
Receives a new or existing entity object (either User, Role, Action, Plan, Customer or Feature) and saves it to the backend. Should return a true value if the save was successful or croak otherwise. To make it clear, this method should insert new objects and update existing ones.
Entities, Entities::Backend::Memory, Entities::Backend::MongoDB.
Ido Perlmuter, <ido at ido50 dot net>
<ido at ido50 dot net>
Please report any bugs or feature requests to bug-entities at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Entities. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-entities at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Entities::Backend
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Entities
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Entities
CPAN Ratings
http://cpanratings.perl.org/d/Entities
Search CPAN
http://search.cpan.org/dist/Entities/
Copyright 2010-2013 Ido Perlmuter.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Entities, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Entities
CPAN shell
perl -MCPAN -e shell install Entities
For more information on module installation, please visit the detailed CPAN module installation guide.