Author image Michal Josef Špaček

NAME

Toolforge::MixNMatch::Object::User - Mix'n'match user datatype.

SYNOPSIS

 use Toolforge::MixNMatch::Object::User;

 my $obj = Toolforge::MixNMatch::Object::User->new(%params);
 my $count = $obj->count;
 my $uid = $obj->uid;
 my $username = $obj->username;

DESCRIPTION

This datatype is base class for Mix'n'match user.

METHODS

new

 my $obj = Toolforge::MixNMatch::Object::User->new(%params);

Constructor.

Returns instance of object.

  • count

    Count number of records for user. Parameter is required.

  • uid

    User UID. Parameter is required.

  • username

    User name. Parameter is required.

count

 my $count = $obj->count;

Get count for user.

Returns number.

uid

 my $uid = $obj->uid;

Get UID of user.

Returns number.

username

 my $username = $obj->username;

Get user name.

Returns string.

ERRORS

 new():
         From Mo::utils::check_required():
                 Parameter 'count' is required.
                 Parameter 'uid' is required.
                 Parameter 'username' is required.

EXAMPLE

 use strict;
 use warnings;

 use Toolforge::MixNMatch::Object::User;

 # Object.
 my $obj = Toolforge::MixNMatch::Object::User->new(
         'count' => 6,
         'uid' => 1,
         'username' => 'Skim',
 );

 # Get count for user.
 my $count = $obj->count;

 # Get UID of user.
 my $uid = $obj->uid;

 # Get user name.
 my $username = $obj->username;

 # Print out.
 print "Count: $count\n";
 print "UID: $uid\n";
 print "User name: $username\n";

 # Output:
 # Count: 6
 # UID: 1
 # User name: Skim

DEPENDENCIES

Mo, Mo::utils.

SEE ALSO

Toolforge::MixNMatch::Object

Toolforge Mix'n'match tool objects.

REPOSITORY

https://github.com/michal-josef-spacek/Toolforge-MixNMatch-Object

AUTHOR

Michal Josef Špaček mailto:skim@cpan.org

http://skim.cz

LICENSE AND COPYRIGHT

© Michal Josef Špaček 2020

BSD 2-Clause License

VERSION

0.03