Mango::Role - Module representing a user role
my $roles = $provider->search; while (my $role = $roles->next) { print $role->name, $role->description; };
Mango::Role represents a user role.
Sames as "add_users".
Adds a list of users to the current role.
$role->add_users(23, $otheruser);
See "add_users" in Mango::Provider::Roles for more details.
Returns the date and time in UTC the role was created as a DateTime object.
print $role->created;
Gets/sets the description of the current role.
print $role->description;
Deletes the current role.
$role->destroy;
Returns the id of the current role.
print $role->id;
Gets/sets the name of the current role.
print $role->name;
Removes a list of users from the current role.
$role->remove_users(23, $otheruser);
See "remove_users" in Mango::Provider::Roles for more details.
Sames as remove_users.
remove_users
Saves any changes made to the role back to the provider.
$role->password('Red'); $role->update;
Whenever "update" is called, "updated" is automatically set to the current time in UTC.
Returns the date and time in UTC the role was last updated as a DateTime object.
print $role->updated;
Mango::Object, Mango::Provider::Roles
Christopher H. Laco CPAN ID: CLACO claco@chrislaco.com http://today.icantfocus.com/blog/
To install Mango, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mango
CPAN shell
perl -MCPAN -e shell install Mango
For more information on module installation, please visit the detailed CPAN module installation guide.