perldoc > User::Identity

📋 NAME

User::Identity — maintain info about a physical person

🚀 Quick Reference

Use CaseCommandDescription
Create a new user identityUser::Identity->new( $name, %options )Create a user identity with optional attributes like firstname, surname, etc.
Get full name$obj->fullName()Returns full name, guessed from other components if not set explicitly.
Stringify identityprint $objAutomatically calls fullName() when used as string.
Get age$obj->age()Calculates age from date of birth (integer, incremented on birthday).
Check gender$obj->isMale() / isFemale()Returns true if gender is determined (from explicit input or courtesy).
Get formal name$obj->formalName()Constructs formal name from courtesy, initials, prefix, surname, titles.
Get nickname$obj->nickname()Returns nickname (defaults to name if not set).

📚 INHERITANCE

User::Identity
  is a User::Identity::Item

📝 SYNOPSIS

use User::Identity;
my $me = User::Identity->new
 ( 'john'
 , firstname => 'John'
 , surname   => 'Doe'
 );
print $me->fullName  # prints "John Doe"
print $me;           # same

📖 DESCRIPTION

The "User-Identity" distribution is created to maintain a set of informational objects which are related to one user. The "User::Identity" module tries to be smart providing defaults, conversions and often required combinations.

The identities are not implementing any kind of storage, and can therefore be created by any simple or complex Perl program. This way, it is more flexible than an XML file to store the data. For instance, you can decide to store the data with Data::Dumper, Storable, DBI, AddressBook or whatever. Extension to simplify this task are still to be developed.

If you need more kinds of user information, then please contact the module author.

Extends "DESCRIPTION" in User::Identity::Item.

⚙️ OVERLOADED

$obj->stringification()
When an User::Identity is used as string, it is automatically translated into the fullName() of the user involved.

Example:

my $me = User::Identity->new(...)
print $me;          # same as  print $me->fullName
print "I am $me\n"; # also stringification

🛠️ METHODS

Extends "METHODS" in User::Identity::Item.

🔧 Constructors

Extends "Constructors" in User::Identity::Item.

User::Identity->new( [$name], %options )

Create a new user identity, which will contain all data related to a single physical human being. Most user data can only be specified at object construction, because they should never change. A $name may be specified as first argument, but also as option, one way or the other is required.

OptionDefined inDefault
birthundef
charset$ENV{LC_CTYPE}
courtesyundef
descriptionUser::Identity::Itemundef
firstnameundef
formal_nameundef
full_nameundef
genderundef
initialsundef
language'en'
nameUser::Identity::Item<required>
nicknameundef
parentUser::Identity::Itemundef
prefixundef
surnameundef
titlesundef

Options:

🔍 Attributes

Extends "Attributes" in User::Identity::Item.

📂 Collections

Extends "Collections" in User::Identity::Item.

🔎 Searching

Extends "Searching" in User::Identity::Item.

🚨 DIAGNOSTICS

🔗 SEE ALSO

This module is part of User-Identity distribution version 1.01, built on February 11, 2022. Website: http://perl.overmeer.net/CPAN/

📄 LICENSE

Copyrights 2003-2022 by [Mark Overmeer <markov AT cpan.org>]. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/

User::Identity
📋 NAME 🚀 Quick Reference 📚 INHERITANCE 📝 SYNOPSIS 📖 DESCRIPTION ⚙️ OVERLOADED 🛠️ METHODS
🔧 Constructors 🔍 Attributes 📂 Collections 🔎 Searching
🚨 DIAGNOSTICS 🔗 SEE ALSO 📄 LICENSE

Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-07 17:56 @2600:1f28:365:80b0:18ab:df6:7e48:ac07
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format

^_top_^