User::I...ocation(3)
hey bestie! welcome to the User::Identity::Location manpage, from the User Contributed Perl Documentation, section 3. let's get into it π
β¨ NAME β¨
User::Identity::Location - physical location of a person
π« INHERITANCE π«
User::Identity::Location
is a User::Identity::Item
πΈ SYNOPSIS πΈ
use User::Identity;
use User::Identity::Location;
my $me = User::Identity->new(...);
my $addr = User::Identity::Location->new(...);
$me->add(location => $addr);
# Simpler
use User::Identity;
my $me = User::Identity->new(...);
my $addr = $me->add(location => ...);
π¦ DESCRIPTION π¦
okay so the User::Identity::Location object is literally holding the description of a physical location of a person: home, work, travel. The locations are collected by a User::Identity::Collection::Locations object.
Nearly all methods can return undef. Some methods produce language or country specific output.
Extends "DESCRIPTION" in User::Identity::Item.
β¨ METHODS β¨
Extends "METHODS" in User::Identity::Item.
π Constructors
Extends "Constructors" in User::Identity::Item.
$class->new( [$name], %options )
Create a new location. You can specify a name as first argument, or in the OPTION list. Without a specific name, the organization is used as name.
-Option --Defined in --Default
country undef
country_code undef
description User::Identity::Item undef
fax undef
name User::Identity::Item <required>
organization undef
parent User::Identity::Item undef
pc undef
phone undef
pobox undef
pobox_pc undef
postal_code <value of option pc>
state undef
street undef
country => STRINGβ the country.country_code => STRINGβ the country code.description => STRINGβ a description.fax => STRING|ARRAYβ one or more fax numbers.name => STRINGβ the name.organization => STRINGβ the organization.parent => OBJECTβ the parent object.pc => STRINGβ Short name forpostal_code.phone => STRING|ARRAYβ one or more phone numbers.pobox => STRINGβ a Post Office box.pobox_pc => STRINGβ the PO box postal code.postal_code => STRINGβ the postal code.state => STRINGβ the state.street => STRINGβ the street.
π Attributes
Extends "Attributes" in User::Identity::Item.
$obj->city()β The city where the address is located. ποΈ$obj->country()β The country where the address is located. If the name of the country is not known but a country code is defined, the name will be looked-up using Geography::Countries (if installed).$obj->countryCode()β Each country has an ISO standard abbreviation. Specify the country or the country code, and the other will be filled in automatically.$obj->description()β Inherited, see "Attributes" in User::Identity::Item$obj->fax()β One or more fax numbers, likephone().$obj->fullAddress()β Create an address to put on a postal mailing, in the format as normal in the country where it must go to. To be able to achieve that, the country code must be known. If the city is not specified or no street or pobox is given,undefwill be returned: an incomplete address.
Β» example:
print $uil->fullAddress;
print $user->find(location => 'home')->fullAddress;
$obj->name( [$newname] )β Inherited, see "Attributes" in User::Identity::Item$obj->organization()β The organization (for instance company) which is related to this location.$obj->phone()β One or more phone numbers. Please use the international notation, which starts with '+', for instance "+31-26-12131". In scalar context, only the first number is produced. In list context, all numbers are presented.$obj->pobox()β Post Office mail box specification. Use "P.O.Box 314", not simple 314.$obj->poboxPostalCode()β The postal code related to the Post-Office mail box. Defined by new() option "pobox_pc".$obj->postalCode()β The postal code is very country dependent. Also, the location of the code within the formatted string is country dependent.$obj->state()β The state, which is important for some countries but certainly not for the smaller ones. Only set this value when you state has to appear on printed addresses.$obj->street()β Returns the address of this location. Since Perl 5.7.3, you can use unicode in strings, so why not format the address nicely?
ποΈ Collections
Extends "Collections" in User::Identity::Item.
$obj->add($collection, $role)β Inherited, see "Collections" in User::Identity::Item$obj->addCollection( $object | <[$type], %options> )β Inherited, see "Collections" in User::Identity::Item$obj->collection($name)β Inherited, see "Collections" in User::Identity::Item$obj->parent( [$parent] )β Inherited, see "Collections" in User::Identity::Item$obj->removeCollection($object|$name)β Inherited, see "Collections" in User::Identity::Item$any->type()β Inherited, see "Collections" in User::Identity::Item$obj->user()β Inherited, see "Collections" in User::Identity::Item
π Searching
Extends "Searching" in User::Identity::Item.
$obj->find($collection, $role)β Inherited, see "Searching" in User::Identity::Item
π¨ DIAGNOSTICS π¨
- Error: cannot load collection module for
$type($class):$@β Either the specified$typedoes not exist, or that module named$classreturns compilation errors. If the type as specified in the warning is not the name of a package, you specified a nickname which was not defined. Maybe you forgot the 'require' the package which defines the nickname. Cast byaddCollection() - Error: nvalid collection
$name. β The collection with$namedoes not exist and can not be created. Cast byadd() - Error: this
$objectis not a collection. β Cast byaddCollection()
π SEE ALSO π
This module is part of User-Identity version 4.00, built on December 12, 2025. Website: http://perl.overmeer.net/CPAN/
π LICENSE π
For contributors see file ChangeLog.
This software is copyright (c) 2003-2025 by Mark Overmeer.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's the tea, bestie! this page was brought to you by perl v5.42.0, dated 2026-01-17, and the User::I...ocation(3) vibe πβ¨
π¦ where this page comes from
- fedora 44: perl-User-Identity 4.00-2.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms