{
    "mode": "perldoc",
    "parameter": "User::Identity::Archive",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/User%3A%3AIdentity%3A%3AArchive/json",
    "generated": "2026-08-26T03:20:10Z",
    "synopsis": "use User::Identity::Archive::Plain;\nmy $friends = User::Identity::Archive::Plain->new('friends');\n$friends->from(\\*FH);\n$friends->from('.friends');",
    "sections": {
        "NAME": {
            "content": "User::Identity::Archive - base class for archiving user information\n",
            "subsections": []
        },
        "INHERITANCE": {
            "content": "User::Identity::Archive\nis a User::Identity::Item\n\nUser::Identity::Archive is extended by\nUser::Identity::Archive::Plain\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use User::Identity::Archive::Plain;\nmy $friends = User::Identity::Archive::Plain->new('friends');\n$friends->from(\\*FH);\n$friends->from('.friends');\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "An archive stores collections. It depends on the type of archive how and where that is done.\nSome archivers may limit the kinds of selections which can be stored.\n\nExtends \"DESCRIPTION\" in User::Identity::Item.\n",
            "subsections": []
        },
        "OVERLOADED": {
            "content": "",
            "subsections": []
        },
        "METHODS": {
            "content": "Extends \"METHODS\" in User::Identity::Item.\n",
            "subsections": [
                {
                    "name": "Constructors",
                    "content": "Extends \"Constructors\" in User::Identity::Item.\n\nUser::Identity::Archive->new( [$name], %options )\n-Option     --Defined in          --Default\ndescription  User::Identity::Item  undef\nfrom                               undef\nname         User::Identity::Item  <required>\nparent       User::Identity::Item  undef\n\ndescription => STRING\nfrom => FILEHANDLE|FILENAME\nname => STRING\nparent => OBJECT\n"
                },
                {
                    "name": "Attributes",
                    "content": "Extends \"Attributes\" in User::Identity::Item.\n\n$obj->description()\nInherited, see \"Attributes\" in User::Identity::Item\n\n$obj->name( [$newname] )\nInherited, see \"Attributes\" in User::Identity::Item\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::Archive->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"
                },
                {
                    "name": "Access to the archive",
                    "content": "$obj->from($source, %options)\nRead definitions from the specified $source, which usually can be a filehandle or filename.\nThe syntax used in the information $source is archiver dependent.\n\nNot all archivers implement from(), so you may want to check with UNIVERSAL::can()\nbeforehand.\n\nexample:\n\nuse User::Identity::Archive::Some;\nmy $a = User::Identity::Archive::Some->new('xyz');\n$a->from(\\*STDIN) if $a->can('from');\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.02, built on April 17, 2023.\nWebsite: http://perl.overmeer.net/CPAN/\n",
            "subsections": []
        },
        "LICENSE": {
            "content": "Copyrights 2003-2023 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": []
        }
    },
    "summary": "User::Identity::Archive - base class for archiving user information",
    "flags": [],
    "examples": [],
    "see_also": []
}