.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "User::Identity::Location 3pm" .TH User::Identity::Location 3pm "2020-10-18" "perl v5.30.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" User::Identity::Location \- physical location of a person .SH "INHERITANCE" .IX Header "INHERITANCE" .Vb 2 \& User::Identity::Location \& is an User::Identity::Item .Ve .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 5 \& 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 => ...); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" The \f(CW\*(C`User::Identity::Location\*(C'\fR object contains the description of a physical location of a person: home, work, travel. The locations are collected by a User::Identity::Collection::Locations object. .PP Nearly all methods can return \f(CW\*(C`undef\*(C'\fR. Some methods produce language or country specific output. .PP Extends \*(L"\s-1DESCRIPTION\*(R"\s0 in User::Identity::Item. .SH "METHODS" .IX Header "METHODS" Extends \*(L"\s-1METHODS\*(R"\s0 in User::Identity::Item. .SS "Constructors" .IX Subsection "Constructors" Extends \*(L"Constructors\*(R" in User::Identity::Item. .ie n .IP "User::Identity::Location\->\fBnew\fR( [$name], %options )" 4 .el .IP "User::Identity::Location\->\fBnew\fR( [$name], \f(CW%options\fR )" 4 .IX Item "User::Identity::Location->new( [$name], %options )" Create a new location. You can specify a name as first argument, or in the \s-1OPTION\s0 list. Without a specific name, the organization is used as name. .Sp .Vb 10 \& \-Option \-\-Defined in \-\-Default \& country undef \& country_code undef \& description User::Identity::Item undef \& fax undef \& name User::Identity::Item \& organization undef \& parent User::Identity::Item undef \& pc undef \& phone undef \& pobox undef \& pobox_pc undef \& postal_code \& state undef \& street undef .Ve .RS 4 .IP "country => \s-1STRING\s0" 2 .IX Item "country => STRING" .PD 0 .IP "country_code => \s-1STRING\s0" 2 .IX Item "country_code => STRING" .IP "description => \s-1STRING\s0" 2 .IX Item "description => STRING" .IP "fax => STRING|ARRAY" 2 .IX Item "fax => STRING|ARRAY" .IP "name => \s-1STRING\s0" 2 .IX Item "name => STRING" .IP "organization => \s-1STRING\s0" 2 .IX Item "organization => STRING" .IP "parent => \s-1OBJECT\s0" 2 .IX Item "parent => OBJECT" .IP "pc => \s-1STRING\s0" 2 .IX Item "pc => STRING" .PD Short name for \f(CW\*(C`postal_code\*(C'\fR. .IP "phone => STRING|ARRAY" 2 .IX Item "phone => STRING|ARRAY" .PD 0 .IP "pobox => \s-1STRING\s0" 2 .IX Item "pobox => STRING" .IP "pobox_pc => \s-1STRING\s0" 2 .IX Item "pobox_pc => STRING" .IP "postal_code => \s-1STRING\s0" 2 .IX Item "postal_code => STRING" .IP "state => \s-1STRING\s0" 2 .IX Item "state => STRING" .IP "street => \s-1STRING\s0" 2 .IX Item "street => STRING" .RE .RS 4 .RE .PD .SS "Attributes" .IX Subsection "Attributes" Extends \*(L"Attributes\*(R" in User::Identity::Item. .ie n .IP "$obj\->\fBcity\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBcity\fR()" 4 .IX Item "$obj->city()" The city where the address is located. .ie n .IP "$obj\->\fBcountry\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBcountry\fR()" 4 .IX Item "$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). .ie n .IP "$obj\->\fBcountryCode\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBcountryCode\fR()" 4 .IX Item "$obj->countryCode()" Each country has an \s-1ISO\s0 standard abbreviation. Specify the country or the country code, and the other will be filled in automatically. .ie n .IP "$obj\->\fBdescription\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBdescription\fR()" 4 .IX Item "$obj->description()" Inherited, see \*(L"Attributes\*(R" in User::Identity::Item .ie n .IP "$obj\->\fBfax\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBfax\fR()" 4 .IX Item "$obj->fax()" One or more fax numbers, like \fBphone()\fR. .ie n .IP "$obj\->\fBfullAddress\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBfullAddress\fR()" 4 .IX Item "$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, undef will be returned: an incomplete address. .Sp example: .Sp .Vb 2 \& print $uil\->fullAddress; \& print $user\->find(location => \*(Aqhome\*(Aq)\->fullAddress; .Ve .ie n .IP "$obj\->\fBname\fR( [$newname] )" 4 .el .IP "\f(CW$obj\fR\->\fBname\fR( [$newname] )" 4 .IX Item "$obj->name( [$newname] )" Inherited, see \*(L"Attributes\*(R" in User::Identity::Item .ie n .IP "$obj\->\fBorganization\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBorganization\fR()" 4 .IX Item "$obj->organization()" The organization (for instance company) which is related to this location. .ie n .IP "$obj\->\fBphone\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBphone\fR()" 4 .IX Item "$obj->phone()" One or more phone numbers. Please use the international notation, which starts with \f(CW\*(Aq+\*(Aq\fR, for instance \f(CW\*(C`+31\-26\-12131\*(C'\fR. In scalar context, only the first number is produced. In list context, all numbers are presented. .ie n .IP "$obj\->\fBpobox\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBpobox\fR()" 4 .IX Item "$obj->pobox()" Post Office mail box specification. Use \f(CW"P.O.Box 314"\fR, not simple \f(CW314\fR. .ie n .IP "$obj\->\fBpoboxPostalCode\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBpoboxPostalCode\fR()" 4 .IX Item "$obj->poboxPostalCode()" The postal code related to the Post-Office mail box. Defined by \fBnew()\fR option \&\f(CW\*(C`pobox_pc\*(C'\fR. .ie n .IP "$obj\->\fBpostalCode\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBpostalCode\fR()" 4 .IX Item "$obj->postalCode()" The postal code is very country dependent. Also, the location of the code within the formatted string is country dependent. .ie n .IP "$obj\->\fBstate\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBstate\fR()" 4 .IX Item "$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. .ie n .IP "$obj\->\fBstreet\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBstreet\fR()" 4 .IX Item "$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? .SS "Collections" .IX Subsection "Collections" Extends \*(L"Collections\*(R" in User::Identity::Item. .ie n .IP "$obj\->\fBadd\fR($collection, $role)" 4 .el .IP "\f(CW$obj\fR\->\fBadd\fR($collection, \f(CW$role\fR)" 4 .IX Item "$obj->add($collection, $role)" Inherited, see \*(L"Collections\*(R" in User::Identity::Item .ie n .IP "$obj\->\fBaddCollection\fR( $object | <[$type], %options> )" 4 .el .IP "\f(CW$obj\fR\->\fBaddCollection\fR( \f(CW$object\fR | <[$type], \f(CW%options\fR> )" 4 .IX Item "$obj->addCollection( $object | <[$type], %options> )" Inherited, see \*(L"Collections\*(R" in User::Identity::Item .ie n .IP "$obj\->\fBcollection\fR($name)" 4 .el .IP "\f(CW$obj\fR\->\fBcollection\fR($name)" 4 .IX Item "$obj->collection($name)" Inherited, see \*(L"Collections\*(R" in User::Identity::Item .ie n .IP "$obj\->\fBparent\fR( [$parent] )" 4 .el .IP "\f(CW$obj\fR\->\fBparent\fR( [$parent] )" 4 .IX Item "$obj->parent( [$parent] )" Inherited, see \*(L"Collections\*(R" in User::Identity::Item .ie n .IP "$obj\->\fBremoveCollection\fR($object|$name)" 4 .el .IP "\f(CW$obj\fR\->\fBremoveCollection\fR($object|$name)" 4 .IX Item "$obj->removeCollection($object|$name)" Inherited, see \*(L"Collections\*(R" in User::Identity::Item .ie n .IP "$obj\->\fBtype\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBtype\fR()" 4 .IX Item "$obj->type()" .PD 0 .IP "User::Identity::Location\->\fBtype\fR()" 4 .IX Item "User::Identity::Location->type()" .PD Inherited, see \*(L"Collections\*(R" in User::Identity::Item .ie n .IP "$obj\->\fBuser\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBuser\fR()" 4 .IX Item "$obj->user()" Inherited, see \*(L"Collections\*(R" in User::Identity::Item .SS "Searching" .IX Subsection "Searching" Extends \*(L"Searching\*(R" in User::Identity::Item. .ie n .IP "$obj\->\fBfind\fR($collection, $role)" 4 .el .IP "\f(CW$obj\fR\->\fBfind\fR($collection, \f(CW$role\fR)" 4 .IX Item "$obj->find($collection, $role)" Inherited, see \*(L"Searching\*(R" in User::Identity::Item .SH "DIAGNOSTICS" .IX Header "DIAGNOSTICS" .ie n .IP "Error: $object is not a collection." 4 .el .IP "Error: \f(CW$object\fR is not a collection." 4 .IX Item "Error: $object is not a collection." The first argument is an object, but not of a class which extends User::Identity::Collection. .ie n .IP "Error: Cannot load collection module for $type ($class)." 4 .el .IP "Error: Cannot load collection module for \f(CW$type\fR ($class)." 4 .IX Item "Error: Cannot load collection module for $type ($class)." Either the specified \f(CW$type\fR does not exist, or that module named \f(CW$class\fR returns 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. .ie n .IP "Error: Creation of a collection via $class failed." 4 .el .IP "Error: Creation of a collection via \f(CW$class\fR failed." 4 .IX Item "Error: Creation of a collection via $class failed." The \f(CW$class\fR did compile, but it was not possible to create an object of that class using the options you specified. .IP "Error: Don't know what type of collection you want to add." 4 .IX Item "Error: Don't know what type of collection you want to add." If you add a collection, it must either by a collection object or a list of options which can be used to create a collection object. In the latter case, the type of collection must be specified. .ie n .IP "Warning: No collection $name" 4 .el .IP "Warning: No collection \f(CW$name\fR" 4 .IX Item "Warning: No collection $name" The collection with \f(CW$name\fR does not exist and can not be created. .SH "SEE ALSO" .IX Header "SEE ALSO" This module is part of User-Identity distribution version 1.00, built on October 14, 2020. Website: \fIhttp://perl.overmeer.net/CPAN/\fR .SH "LICENSE" .IX Header "LICENSE" Copyrights 2003\-2020 by [Mark Overmeer ]. For other contributors see ChangeLog. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See \fIhttp://dev.perl.org/licenses/\fR