NAME
Entities::Backend::Memory - A simple backend that stores all data in memory, for testing and development purposes.
VERSION
version 0.4
SYNOPSIS
use Entities;
use Entities::Backend::Memory;
# see synopsis at L<Entities>
DESCRIPTION
This backend for the Entities user management and authorization system stores all entities and relations between them in memory. It is only meant for quick testing and rapid development. Please, do not use this in production environments.
UNIQUE METHODS
The following method are unique to this backend only.
new()
Creates a new instance of this module.
roles( [\@roles] )
In scalar context, returns an array-ref of all <role objects|Entities::Role> stored in memory. In list context returns an array. If a list of role objects is provided, it will replace the current list.
users( [\@users] )
In scalar context, returns an array-ref of all <user objects|Entities::User> stored in memory. In list context returns an array. If a list of user objects is provided, it will replace the current list.
actions( [\@actions] )
In scalar context, returns an array-ref of all <action objects|Entities::Action> stored in memory. In list context returns an array. If a list of action objects is provided, it will replace the current list.
plans( [\@plans] )
In scalar context, returns an array-ref of all <plan objects|Entities::Plan> stored in memory. In list context returns an array. If a list of plan objects is provided, it will replace the current list.
customers( [\@customers] )
In scalar context, returns an array-ref of all <customer objects|Entities::Customer> stored in memory. In list context returns an array. If a list of customer objects is provided, it will replace the current list.
features( [\@features] )
In scalar context, returns an array-ref of all <feature objects|Entities::Feature> stored in memory. In list context returns an array. If a list of feature objects is provided, it will replace the current list.
METHODS IMPLEMENTED
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.
get_user_from_id( $user_id )
get_user_from_name( $username )
get_role( $role_name )
get_customer( $customer_name )
get_plan( $plan_name )
get_feature( $feature_name )
get_action( $action_name )
save( $obj )
METHOD MODIFIERS
The following list documents any method modifications performed through the magic of Moose.
around qw/roles actions users plans customers features/
If any of the above methods are called in list context, this method modifier will automatically dereference the results into an array.
SEE ALSO
Entities, Entities::Backend, Entities::Backend::MongoDB.
AUTHOR
Ido Perlmuter, <ido at ido50 dot net>
BUGS
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.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Entities::Backend::Memory
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
LICENSE AND COPYRIGHT
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.