{
    "content": [
        {
            "type": "text",
            "text": "# User::Identity (perldoc)\n\n## NAME\n\nUser::Identity - maintain info about a physical person\n\n## SYNOPSIS\n\nuse User::Identity;\nmy $me = User::Identity->new\n( 'john'\n, firstname => 'John'\n, surname   => 'Doe'\n);\nprint $me->fullName  # prints \"John Doe\"\nprint $me;           # same\n\n## DESCRIPTION\n\nThe \"User-Identity\" distribution is created to maintain a set of informational objects which are\nrelated to one user. The \"User::Identity\" module tries to be smart providing defaults,\nconversions and often required combinations.\n\n## Sections\n\n- **NAME**\n- **INHERITANCE**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OVERLOADED**\n- **METHODS** (4 subsections)\n- **DIAGNOSTICS**\n- **SEE ALSO**\n- **LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "User::Identity",
        "section": "",
        "mode": "perldoc",
        "summary": "User::Identity - maintain info about a physical person",
        "synopsis": "use User::Identity;\nmy $me = User::Identity->new\n( 'john'\n, firstname => 'John'\n, surname   => 'Doe'\n);\nprint $me->fullName  # prints \"John Doe\"\nprint $me;           # same",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "INHERITANCE",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "OVERLOADED",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 2,
                "subsections": [
                    {
                        "name": "Constructors",
                        "lines": 43
                    },
                    {
                        "name": "Attributes",
                        "lines": 80
                    },
                    {
                        "name": "Collections",
                        "lines": 24
                    },
                    {
                        "name": "Searching",
                        "lines": 5
                    }
                ]
            },
            {
                "name": "DIAGNOSTICS",
                "lines": 22,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "User::Identity - maintain info about a physical person\n",
                "subsections": []
            },
            "INHERITANCE": {
                "content": "User::Identity\nis a User::Identity::Item\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use User::Identity;\nmy $me = User::Identity->new\n( 'john'\n, firstname => 'John'\n, surname   => 'Doe'\n);\nprint $me->fullName  # prints \"John Doe\"\nprint $me;           # same\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The \"User-Identity\" distribution is created to maintain a set of informational objects which are\nrelated to one user. The \"User::Identity\" module tries to be smart providing defaults,\nconversions and often required combinations.\n\nThe identities are not implementing any kind of storage, and can therefore be created by any\nsimple or complex Perl program. This way, it is more flexible than an XML file to store the\ndata. For instance, you can decide to store the data with Data::Dumper, Storable, DBI,\nAddressBook or whatever. Extension to simplify this task are still to be developed.\n\nIf you need more kinds of user information, then please contact the module author.\n\nExtends \"DESCRIPTION\" in User::Identity::Item.\n",
                "subsections": []
            },
            "OVERLOADED": {
                "content": "$obj->stringification()\nWhen an \"User::Identity\" is used as string, it is automatically translated into the\nfullName() of the user involved.\n\nexample:\n\nmy $me = User::Identity->new(...)\nprint $me;          # same as  print $me->fullName\nprint \"I am $me\\n\"; # also stringification\n",
                "subsections": []
            },
            "METHODS": {
                "content": "Extends \"METHODS\" in User::Identity::Item.\n",
                "subsections": [
                    {
                        "name": "Constructors",
                        "content": "Extends \"Constructors\" in User::Identity::Item.\n\nUser::Identity->new( [$name], %options )\nCreate a new user identity, which will contain all data related to a single physical human\nbeing. Most user data can only be specified at object construction, because they should\nnever change. A $name may be specified as first argument, but also as option, one way or the\nother is required.\n\n-Option     --Defined in          --Default\nbirth                              undef\ncharset                            $ENV{LCCTYPE}\ncourtesy                           undef\ndescription  User::Identity::Item  undef\nfirstname                          undef\nformalname                        undef\nfullname                          undef\ngender                             undef\ninitials                           undef\nlanguage                           'en'\nname         User::Identity::Item  <required>\nnickname                           undef\nparent       User::Identity::Item  undef\nprefix                             undef\nsurname                            undef\ntitles                             undef\n\nbirth => DATE\ncharset => STRING\ncourtesy => STRING\ndescription => STRING\nfirstname => STRING\nformalname => STRING\nfullname => STRING\ngender => STRING\ninitials => STRING\nlanguage => STRING\nname => STRING\nnickname => STRING\nparent => OBJECT\nprefix => STRING\nsurname => STRING\ntitles => STRING\n"
                    },
                    {
                        "name": "Attributes",
                        "content": "Extends \"Attributes\" in User::Identity::Item.\n\n$obj->age()\nCalcuted from the datge of birth to the current moment, as integer. On the birthday, the\nnumber is incremented already.\n\n$obj->birth()\nReturns the date in standardized format: YYYYMMDD, easy to sort and select. This may return\n\"undef\", even if the dateOfBirth() contains a value, simply because the format is not\nunderstood. Month or day may contain '00' to indicate that those values are not known.\n\n$obj->charset()\nThe user's preferred character set, which defaults to the value of LCCTYPE environment\nvariable.\n\n$obj->courtesy()\nThe courtesy is used to address people in a very formal way. Values are like \"Mr.\", \"Mrs.\",\n\"Sir\", \"Frau\", \"Heer\", \"de heer\", \"mevrouw\". This often provides a way to find the gender of\nsomeone addressed.\n\n$obj->dateOfBirth()\nReturns the date of birth, as specified during instantiation.\n\n$obj->description()\nInherited, see \"Attributes\" in User::Identity::Item\n\n$obj->firstname()\nReturns the first name of the user. If it is not defined explicitly, it is derived from the\nnickname, and than capitalized if needed.\n\n$obj->formalName()\nReturns a formal name for the user. If not defined as instantiation parameter (see new()),\nit is constructed from other available information, which may result in an incorrect or an\nincomplete name. The result is built from \"courtesy initials prefix surname title\".\n\n$obj->fullName()\nIf this is not specified as value during object construction, it is guessed based on other\nknown values like \"firstname prefix surname\". If a surname is provided without firstname,\nthe nickname is taken as firstname. When a firstname is provided without surname, the\nnickname is taken as surname. If both are not provided, then the nickname is used as\nfullname.\n\n$obj->gender()\nReturns the specified gender of the person, as specified during instantiation, which could\nbe like 'Male', 'm', 'homme', 'man'. There is no smart behavior on this: the exact specified\nvalue is returned. Methods isMale(), isFemale(), and courtesy() are smart.\n\n$obj->initials()\nThe initials, which may be derived from the first letters of the firstname.\n\n$obj->isFemale()\nSee isMale(): return true if we are sure the user is a woman.\n\n$obj->isMale()\nReturns true if we are sure that the user is male. This is specified as gender at\ninstantiation, or derived from the courtesy value. Methods isMale and isFemale are not\ncomplementatory: they can both return false for the same user, in which case the gender is\nundertermined.\n\n$obj->language()\nCan contain a list or a single language name, as defined by the RFC Examples are 'en',\n'en-GB', 'nl-BE'. The default language is 'en' (English).\n\n$obj->name( [$newname] )\nInherited, see \"Attributes\" in User::Identity::Item\n\n$obj->nickname()\nReturns the user's nickname, which could be used as username, e-mail alias, or such. When no\nnickname was explicitly specified, the name is used.\n\n$obj->prefix()\nThe words which are between the firstname (or initials) and the surname.\n\n$obj->surname()\nReturns the surname of person, or \"undef\" if that is not known.\n\n$obj->titles()\nThe titles, degrees in education or of other kind. If these are complex, you may need to\nspecify the formal name of the users as well, because smart formatting probably failes.\n"
                    },
                    {
                        "name": "Collections",
                        "content": "Extends \"Collections\" in User::Identity::Item.\n\n$obj->add($collection, $role)\nInherited, see \"Collections\" in User::Identity::Item\n\n$obj->addCollection( $object | <[$type], %options> )\nInherited, see \"Collections\" in User::Identity::Item\n\n$obj->collection($name)\nInherited, see \"Collections\" in User::Identity::Item\n\n$obj->parent( [$parent] )\nInherited, see \"Collections\" in User::Identity::Item\n\n$obj->removeCollection($object|$name)\nInherited, see \"Collections\" in User::Identity::Item\n\n$obj->type()\nUser::Identity->type()\nInherited, see \"Collections\" in User::Identity::Item\n\n$obj->user()\nInherited, see \"Collections\" in User::Identity::Item\n"
                    },
                    {
                        "name": "Searching",
                        "content": "Extends \"Searching\" in User::Identity::Item.\n\n$obj->find($collection, $role)\nInherited, see \"Searching\" in User::Identity::Item\n"
                    }
                ]
            },
            "DIAGNOSTICS": {
                "content": "Error: $object is not a collection.\nThe first argument is an object, but not of a class which extends\nUser::Identity::Collection.\n\nError: Cannot load collection module for $type ($class).\nEither the specified $type does not exist, or that module named $class returns compilation\nerrors. If the type as specified in the warning is not the name of a package, you specified\na nickname which was not defined. Maybe you forgot the 'require' the package which defines\nthe nickname.\n\nError: Creation of a collection via $class failed.\nThe $class did compile, but it was not possible to create an object of that class using the\noptions you specified.\n\nError: Don't know what type of collection you want to add.\nIf you add a collection, it must either by a collection object or a list of options which\ncan be used to create a collection object. In the latter case, the type of collection must\nbe specified.\n\nWarning: No collection $name\nThe collection with $name does not exist and can not be created.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "This module is part of User-Identity distribution version 1.01, built on February 11, 2022.\nWebsite: http://perl.overmeer.net/CPAN/\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "Copyrights 2003-2022 by [Mark Overmeer <markov@cpan.org>]. For other contributors see ChangeLog.\n\nThis program is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself. See http://dev.perl.org/licenses/\n",
                "subsections": []
            }
        }
    }
}