יובל קוג'מן (Yuval Kogman) > KiokuX-User-0.01 > KiokuX::User

Download:
KiokuX-User-0.01.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.01   Source   Latest Release: KiokuX-User-0.02

NAME ^

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

SYNOPSIS ^

        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";
        }

DESCRIPTION ^

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.

VERSION CONTROL ^

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.

AUTHOR ^

Yuval Kogman <nothingmuch@woobling.org>

COPYRIGHT ^

        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.
syntax highlighting: