- UNIQUE METHODS
- METHODS IMPLEMENTED
- METHOD MODIFIERS
- SEE ALSO
- LICENSE AND COPYRIGHT
Entities::Backend::MongoDB - Stores all Entities data in a MongoDB database.
use Entities; use Entities::Backend::MongoDB; # see synopsis at L<Entities>
This backend for the Entities user management and authorization system stores all entities and relations between them in a MongoDB database, using the MongoDB module. This is a powerful, fast backend that gives you all the features of MongoDB. This is the only backend right now that can be used in production environments.
A big advantage of using this backend is that there is no setup work necessary. Just make sure your MongoDB daemon is running, and this backend will automatically create the database and necessary collections.
The following method are unique to this backend only.
Creates a new instance of this module. Can receive the hostname of the server running the MongoDB daemon, the port on that host where the daemon is listening, and the name of the database to use. None of these parameters is required, host will default to 'localhost', port will default to 27017 (the default MongoDB port) and db_name will default to 'entities'.
Returns the host name or IP of the MongoDB server.
Returns the port number on the host where the MongoDB server listens.
Returns the name of the database into which all data is saved.
Returns the MongoDB::Database object used for actually storing and retrieving data. If a MongoDB::Database object is provided, it will replace the current object.
Receives an entity object (either user, action, role, feature, plan or customer) and turns it into a hash-ref that can be saved in the database.
The following methods implement the methods that the Entities::Backend Moose role requires backend classes to implement. See the documentation of that role for more information on these methods.
The following list documents any method modifications performed through the magic of Moose.
This method is automatically invoked immediately after the
new() method is invoked. It is used to initiate the connection to the MongoDB database and store it in the object.
<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.
You can find documentation for this module with the perldoc command.
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
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.