man > User::Identity::Item

📝 NAME

User::Identity::Item - general base class for User::Identity

🚀 Quick Reference

Use CaseCommandDescription
Create a new itemUser::Identity::Item->new($name, %options)Create a named item with optional description and parent
Add a role to a collection$obj->add($collection, $role)Add a role to a collection, auto-creating the collection if needed
Add a collection$obj->addCollection($object|%options)Add a new collection (by object or type+options)
Get a collection or its roles$obj->collection($name)Return the collection object (scalar) or all roles (list)
Find a role in a collection$obj->find($collection, $role)Find a specific role by name within a collection
Get the parent item$obj->parent([$parent])Get or set the parent object
Get the user object$obj->user()Traverse up to the topmost User::Identity object

🔗 INHERITANCE

📋 SYNOPSIS

📖 DESCRIPTION

The "User::Identity::Item" base class is extended into useful modules: it has no use by its own.

⚙️ METHODS

🏗️ Constructors

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

🏷️ Attributes

📂 Collections

Example:

my $ui   = User::Identity->new(...);
my $home = $ui->add(location => [home => street => '27 Roadstreet', ...] );
my $work = $ui->add(location => work, tel => '+31-2231-342-13', ... );

my $travel = User::Identity::Location->new(travel => ...);
$ui->add(location => $travel);

my $system = User::Identity::Collection::System->new(...);
$ui->add($system => 'localhost');

Example:

my $me   = User::Identity->new(...);
my $locs = User::Identity::Collection::Locations->new();
$me->addCollection($locs);

my $email = $me->addCollection(type => 'email');
my $email = $me->addCollection('email');

Example:

my @roles = $me->collection('email');        # list of collected items
my @roles = $me->collection('email')->roles; # same of collected items
my $coll  = $me->collection('email');        # a User::Identity::Collection

Example:

print $email->user->fullName;

🔍 Searching

Example:

my $role  = $me->find(location => 'work');       # one location
my $role  = $me->collection('location')->find('work'); # same

my $email = $me->addCollection('email');
$me->find($email => 'work');
$email->find('work');   # same

⚠️ 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::Item
📝 NAME 🚀 Quick Reference 🔗 INHERITANCE 📋 SYNOPSIS 📖 DESCRIPTION ⚙️ 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-07-27 12:01 @216.73.216.194
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format

^_top_^