ACL::Lite - Liteweight and flexible ACL checks
Version 0.0002
use ACL::Lite; $acl = ACL::Lite->new(permissions => 'foo,bar'); $acl->check('foo'); if ($ret = $acl->check([qw/baz bar/])) { print "Check successful with permission $ret\n"; } unless ($acl->check('baz')) { print "Permission denied\n"; }
Creates an ACL::Lite object by passing the following parameters:
User identifier for authenticated users.
Granted permissions.
Separator used to parse permission strings. Defaults to ,.
,
Checks whether any of the permissions in $permissions is granted. Returns first permission which grants access.
Returns permissions as hash reference:
$perms = $acl->permissions;
Returns permissions as list:
@perms = $acl->permissions;
Please anticipate API changes in this early state of development.
Stefan Hornburg (Racke), racke@linuxia.de
racke@linuxia.de
Please report any bugs or feature requests to bug-acl-lite at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ACL-Lite. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-acl-lite at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc ACL::Lite
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=ACL-Lite
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/ACL-Lite
CPAN Ratings
http://cpanratings.perl.org/d/ACL-Lite
Search CPAN
http://search.cpan.org/dist/ACL-Lite/
Copyright 2011-2013 Stefan Hornburg (Racke).
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 ACL::Lite, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ACL::Lite
CPAN shell
perl -MCPAN -e shell install ACL::Lite
For more information on module installation, please visit the detailed CPAN module installation guide.