The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Mango::Role - A user role

SYNOPSIS

    my $roles = $provider->search;
    while (my $role = $roles->next) {
        print $role->name, $role->description;
    };

DESCRIPTION

Mango::Role represents a user role.

METHODS

add_users

Arguments: @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.

add_user

Sames as add_users.

id

Returns id of the current role.

    print $role->id;

created

Returns the date the role was created as a DateTime object.

    print $role->created;

destroy

Deletes the current item from the provider.

updated

Returns the date the role was last updated as a DateTime object.

    print $role->updated;

name

Arguments: $name

Gets/sets the name of the role.

    print $role->name;

description

Arguments: $description

Gets/sets the description of the attribute.

    print $role->description;

remove_users

Arguments: @users

Removes a list of users from the current role.

    $role->remove_users(23, $otheruser);

See "remove_users" in Mango::Provider::Roles for more details.

remove_user

Sames as remove_users.

update

Saves any changes to the role back to the provider.

SEE ALSO

Mango::Object, Mango::Provider::Roles

AUTHOR

    Christopher H. Laco
    CPAN ID: CLACO
    claco@chrislaco.com
    http://today.icantfocus.com/blog/