KiokuX::User::ID - KiokuDB::Role::ID integration for user objects
with qw(KiokuX::User::ID);
This role provides an id attribute for user objects, and self registers in the KiokuDB directory with the object ID user:$user_id.
id
user:$user_id
Using this role implies that user IDs are immutable.
Implements the required method from KiokuX::User::ID by prefixing the id attribute with user:.
user:
Mangles the username into an ID by prefixing the string user:.
Can be overriden to provide custom namespacing.
Can also be used as a class method from the model:
sub get_identity_by_username { my ( $self, $username ) = @_; my $object_id = MyFoo::Schema::Identity::Username->id_for_user($username); return $self->lookup($object_id); }
This is the user's ID in the system. It is not the object ID, but the object ID is derived from it.
To install KiokuX::User, copy and paste the appropriate command in to your terminal.
cpanm
cpanm KiokuX::User
CPAN shell
perl -MCPAN -e shell install KiokuX::User
For more information on module installation, please visit the detailed CPAN module installation guide.