{
    "content": [
        {
            "type": "text",
            "text": "# Mail::Box::Identity (perldoc)\n\n## NAME\n\nMail::Box::Identity - represents an unopened folder\n\n## SYNOPSIS\n\nuse User::Identity;\nuse Mail::Box::Identity;\nmy $me   = User::Identity->new(...);\nmy $mailbox = Mail::Box::Identity->new(...);\n$me->add(folders => $mailbox);\n# Simpler\nuse User::Identity;\nmy $me   = User::Identity->new(...);\nmy $addr = $me->add(folders => ...);\n\n## DESCRIPTION\n\nThe \"Mail::Box::Identity\" object contains the description of a single mailbox. The mailboxes are\ncollected by an Mail::Box::Collection object. This corresponds with IMAP's \"\\NoSelect\", for\ninstance.\n\n## Sections\n\n- **NAME**\n- **INHERITANCE**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **METHODS** (7 subsections)\n- **DIAGNOSTICS**\n- **SEE ALSO**\n- **LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Mail::Box::Identity",
        "section": "",
        "mode": "perldoc",
        "summary": "Mail::Box::Identity - represents an unopened folder",
        "synopsis": "use User::Identity;\nuse Mail::Box::Identity;\nmy $me   = User::Identity->new(...);\nmy $mailbox = Mail::Box::Identity->new(...);\n$me->add(folders => $mailbox);\n# Simpler\nuse User::Identity;\nmy $me   = User::Identity->new(...);\nmy $addr = $me->add(folders => ...);",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "INHERITANCE",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 4,
                "subsections": [
                    {
                        "name": "Constructors",
                        "lines": 52
                    },
                    {
                        "name": "Attributes",
                        "lines": 40
                    },
                    {
                        "name": "Collections",
                        "lines": 24
                    },
                    {
                        "name": "Searching",
                        "lines": 5
                    },
                    {
                        "name": "Subfolders",
                        "lines": 52
                    },
                    {
                        "name": "Error handling",
                        "lines": 41
                    },
                    {
                        "name": "Cleanup",
                        "lines": 5
                    }
                ]
            },
            {
                "name": "DIAGNOSTICS",
                "lines": 39,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Mail::Box::Identity - represents an unopened folder\n",
                "subsections": []
            },
            "INHERITANCE": {
                "content": "Mail::Box::Identity\nis an User::Identity::Item\n\nMail::Box::Identity\nis a Mail::Reporter\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use User::Identity;\nuse Mail::Box::Identity;\nmy $me   = User::Identity->new(...);\n\nmy $mailbox = Mail::Box::Identity->new(...);\n$me->add(folders => $mailbox);\n\n# Simpler\n\nuse User::Identity;\nmy $me   = User::Identity->new(...);\nmy $addr = $me->add(folders => ...);\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The \"Mail::Box::Identity\" object contains the description of a single mailbox. The mailboxes are\ncollected by an Mail::Box::Collection object. This corresponds with IMAP's \"\\NoSelect\", for\ninstance.\n\nNearly all methods can return undef.\n\nExtends \"DESCRIPTION\" in Mail::Reporter.\n\nExtends \"DESCRIPTION\" in User::Identity::Item.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "Extends \"METHODS\" in Mail::Reporter.\n\nExtends \"METHODS\" in User::Identity::Item.\n",
                "subsections": [
                    {
                        "name": "Constructors",
                        "content": "Extends \"Constructors\" in Mail::Reporter.\n\nExtends \"Constructors\" in User::Identity::Item.\n\nMail::Box::Identity->new( [$name], %options )\n-Option     --Defined in          --Default\ndeleted                            <false>\ndescription  User::Identity::Item  undef\nfoldertype                        from parent\ninferiors                          1\nlocation                           undef\nlog          Mail::Reporter        'WARNINGS'\nmanager                            <from parent>\nmarked                             undef\nname         User::Identity::Item  <required>\nonlysubs                          <foldertype and name dependent>\nparent       User::Identity::Item  undef\nsubftype                          <same as parent>\ntrace        Mail::Reporter        'WARNINGS'\n\ndeleted => BOOLEAN\nThe folder is flagged for deletion. This not have any implications yet, because it may\nstill get undeleted.\n\ndescription => STRING\nfoldertype => CLASS\ninferiors => BOOLEAN\nCan this folder have children? If not, this is cleared.\n\nlocation => DIRECTORY|FILENAME\nThe location of this folder. Often, only the manager can figure-out where this folder\nreally is.\n\nlog => LEVEL\nmanager => OBJECT\nAny Mail::Box::Manager or Mail::Box::Manage::User OBJECT.\n\nmarked => BOOLEAN|\"undef\"\nWhether the folder is flagged for some reason, for instance because new messages have\narrived.\n\nname => STRING\nonlysubs => BOOLEAN\nSome folder types can have messages in their toplevel folder, other cannot. That\ndetermines the default. See Mail::Box::topFolderWithMessages()\n\nparent => OBJECT\nsubftype => CLASS\nThe type for a subfolder collection, must extend CLASS Mail::Box::Collection.\n\ntrace => LEVEL\n"
                    },
                    {
                        "name": "Attributes",
                        "content": "Extends \"Attributes\" in User::Identity::Item.\n\n$obj->deleted( [BOOLEAN] )\n$obj->description()\nInherited, see \"Attributes\" in User::Identity::Item\n\n$obj->folderType()\nReturns the type of this folder.\n\n$obj->fullname( [$delimeter] )\nReturns the name of the folder, from the toplevel until this one, with the $delimeter string\nbetween each level. $delimeter default to a forward slash (a \"/\").\n\n$obj->inferiors( [BOOLEAN] )\n\"Inferiors\" are \"subfolders\". When this flag is set, it is permitted to create subfolders.\n\n$obj->location( [$filename|$directory|undef] )\nReturns the directory or filename of the folder. If this is not pre-defined, it is computed\nbased on the knowledge about the folder type. Be sure to set the location of the toplevel\nfolder to the folderdir of the user to get this to work.\n\n$obj->manager()\nReturns the manager (usually a Mail::Box::Manage::User which owns the folders. May be\nundefined, by default from parent.\n\n$obj->marked( [BOOLEAN|undef] )\nWhen something special has happened with the folder, this flag can be set (or cleared). The\n\"undef\" status is an \"unknown\". In the IMAP4 protocol, 0 will result in a \"\\Unmarked\", a 1\nresults in a \"\\Marked\", and \"undef\" in nothing.\n\n$obj->name( [$newname] )\nInherited, see \"Attributes\" in User::Identity::Item\n\n$obj->onlySubfolders( [BOOLEAN] )\nThan this folder be opened (without trying) or not? The default depends on the folder type,\nand whether this is the toplevel folder or not. See Mail::Box::topFolderWithMessages()\n\n$obj->topfolder()\nRun up the tree to find the highest level folder.\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()\nMail::Box::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"
                    },
                    {
                        "name": "Subfolders",
                        "content": "$obj->addSubfolder($m<Mail::Box::Identity>|$data)\nAdd a new folder into the administration. With $data, a new object will be instantiated\nfirst. The identity is returned on success.\n\n$obj->folder( [..., $name] )\nReturns the subfolder's object with $name or \"undef\" if it does not exist. When multiple\nNAMEs are added, those super folders are traverst first. Without any $name, the current\nobject is returned\n\nexample: get some folder\n\nmy $a = $user->folders->folder('b', 'a');\n\nmy $name  = \"a:b:c\";\nmy $delim = \":\";\nmy $f = $user->folders->folder(split $delim, $name);\n\n$obj->foreach(CODE)\nFor each of the subfolders found below this point call CODE. This current folder is called\nfirst. Be warned that you may find identities with the deleted() flag on.\n\n$obj->open(%options)\nOpen the folder which is described by this identity. Returned is some Mail::Box. The options\nare passed to Mail::Box::Manager::open().\n\n$obj->remove( [$name] )\nRemove the folder (plus subfolders) with the $name. Without $name, this\n\"Mail::Box::Identity\" itself is removed.\n\nThe removed structure is returned, which is \"undef\" if not found. This is only an\nadministrative remove, you still need a Mail::Box::Manager::delete().\n\n$obj->rename( $folder, [$newsubname] )\nMove the folder to a different super-$folder, under a NEW SUBfolder NAME.\n\nexample: renaming a folder\n\nmy $top = $user->topfolder;\nmy $new = $top->folder('xyz') or die;\nmy $f   = $top->folder('abc', 'def')->rename($new, '123');\n\nprint $f->name;      # 123\nprint $f->fullname;  # =/xyz/123\n\n$obj->subfolderNames()\nConvenience method: returns the names of the collected subfolders.\n\n$obj->subfolders()\nReturns the subfolders or \"undef\" if there are none. This information is lazy evaluated and\ncached. In LIST context, the folder objects are returned (Mail::Box::Identity objects), in\nSCALAR context the collection, the Mail::Box::Collection.\n"
                    },
                    {
                        "name": "Error handling",
                        "content": "Extends \"Error handling\" in Mail::Reporter.\n\n$obj->AUTOLOAD()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->addReport($object)\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )\nMail::Box::Identity->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->errors()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->log( [$level, [$strings]] )\nMail::Box::Identity->log( [$level, [$strings]] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->logPriority($level)\nMail::Box::Identity->logPriority($level)\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->logSettings()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->notImplemented()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->report( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->reportAll( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->trace( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->warnings()\nInherited, see \"Error handling\" in Mail::Reporter\n"
                    },
                    {
                        "name": "Cleanup",
                        "content": "Extends \"Cleanup\" in Mail::Reporter.\n\n$obj->DESTROY()\nInherited, see \"Cleanup\" in Mail::Reporter\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\nError: It is not permitted to add subfolders to $name\nThe $m<inferiors()> flag prohibits the creation of subfolders to this folder.\n\nWarning: No collection $name\nThe collection with $name does not exist and can not be created.\n\nError: Package $package does not implement $method.\nFatal error: the specific package (or one of its superclasses) does not implement this\nmethod where it should. This message means that some other related classes do implement this\nmethod however the class at hand does not. Probably you should investigate this and probably\ninform the author of the package.\n\nError: The toplevel folder cannot be removed this way\nThe Mail::Box::Identity folder administration structure requires a top directory. That top\nis registered somewhere (for instance by a Mail::Box::Manage::User). If you need to remove\nthe top, you have to look for a method of that object.\n\nError: Toplevel directory requires explicit folder type\nError: Toplevel directory requires explicit location\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "This module is part of Mail-Box distribution version 3.009, built on August 18, 2020. Website:\nhttp://perl.overmeer.net/CPAN/\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "Copyrights 2001-2020 by [Mark Overmeer]. 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": []
            }
        }
    }
}