
KiokuX::User - A generic role for user objects stored in KiokuDB

package MyFoo::User;
use Moose;
use KiokuX::User::Util qw(crypt_password);
with qw(KiokuX::User);
my $user = MyFoo::User->new(
id => $user_id,
password => crypt_password($password),
);
$user->kiokudb_object_id; # "user:$user_id"
if ( $user->check_password($read_password) ) {
warn "Login successful";
} else {
warn "Login failed";
}

This role provides a fairly trivial set of attributes and methods designed to ease the storage of objects representing users in a KiokuDB database.
It consumes KiokuX::User::ID which provides the id attribute and KiokuDB::Role::ID integration, and KiokuX::User::Password which provides an Authen::Passphrase based password attribute and a check_password method.

This module is maintained using Darcs. You can get the latest version from http://nothingmuch.woobling.org/code, and use darcs send to commit changes.

Yuval Kogman <nothingmuch@woobling.org>

Copyright (c) 2008 Yuval Kogman. All rights reserved
This program is free software; you can redistribute
it and/or modify it under the same terms as Perl itself.