{
    "mode": "perldoc",
    "parameter": "Mail::Box::Collection",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ABox%3A%3ACollection/json",
    "generated": "2026-06-11T01:39:36Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "Mail::Box::Collection - a collection of subfolders\n",
            "subsections": []
        },
        "INHERITANCE": {
            "content": "Mail::Box::Collection\nis an User::Identity::Collection\nis an User::Identity::Item\n\nMail::Box::Collection\nis a Mail::Reporter\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The Mail::Box::Collection object maintains a set Mail::Box::Identity objects, each describing a\nthe location of a single mailbox (folder). The collection is used by the Mail::Box::Manage::User\nobject to administer the folders of a single user, even if those folders are closed.\n\nExtends \"DESCRIPTION\" in Mail::Reporter.\n\nExtends \"DESCRIPTION\" in User::Identity::Collection.\n",
            "subsections": []
        },
        "OVERLOADED": {
            "content": "Extends \"OVERLOADED\" in User::Identity::Collection.\n\noverload: @{}\nInherited, see \"OVERLOADED\" in User::Identity::Collection\n\noverload: stringification\nInherited, see \"OVERLOADED\" in User::Identity::Collection\n",
            "subsections": []
        },
        "METHODS": {
            "content": "Extends \"METHODS\" in Mail::Reporter.\n\nExtends \"METHODS\" in User::Identity::Collection.\n",
            "subsections": [
                {
                    "name": "Constructors",
                    "content": "Extends \"Constructors\" in Mail::Reporter.\n\nExtends \"Constructors\" in User::Identity::Collection.\n\nMail::Box::Collection->new( [$name], %options )\n-Option     --Defined in                --Default\ndescription  User::Identity::Item        undef\nfoldertype                              <from parent>\nitemtype    User::Identity::Collection  Mail::Box::Identity\nlog          Mail::Reporter              'WARNINGS'\nmanager                                  <from parent>\nname         User::Identity::Item        'folders'\nparent       User::Identity::Item        undef\nroles        User::Identity::Collection  undef\ntrace        Mail::Reporter              'WARNINGS'\n\ndescription => STRING\nfoldertype => CLASS\nitemtype => CLASS\nlog => LEVEL\nmanager => OBJECT\nAn Mail::Box::Manager OBJECT (could be a Mail::Box::Manage::User).\n\nname => STRING\nparent => OBJECT\nroles => ROLE|ARRAY\ntrace => LEVEL\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::Collection->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::Collection->log( [$level, [$strings]] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->logPriority($level)\nMail::Box::Collection->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"
                },
                {
                    "name": "Attributes",
                    "content": "Extends \"Attributes\" in User::Identity::Collection.\n\n$obj->description()\nInherited, see \"Attributes\" in User::Identity::Item\n\n$obj->folderType( [$folderclass] )\nReturns the type of folder (on this location). When specified, then $folderclass must be a\nMail::Box extension.\n\n$obj->itemType()\nInherited, see \"Attributes\" in User::Identity::Collection\n\n$obj->manager()\nThe Mail::Box::Manager (usually a Mail::Box::Manage::User object), which is handling the\nopening of folders.\n\n$obj->name( [$newname] )\nInherited, see \"Attributes\" in User::Identity::Item\n\n$obj->roles()\nInherited, see \"Attributes\" in User::Identity::Collection\n"
                },
                {
                    "name": "Collections",
                    "content": "Extends \"Collections\" in User::Identity::Collection.\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::Collection->type()\nInherited, see \"Collections\" in User::Identity::Item\n\n$obj->user()\nInherited, see \"Collections\" in User::Identity::Item\n"
                },
                {
                    "name": "Maintaining roles",
                    "content": "Extends \"Maintaining roles\" in User::Identity::Collection.\n\n$obj->addRole($role| <[$name],%options> | ARRAY)\nInherited, see \"Maintaining roles\" in User::Identity::Collection\n\n$obj->removeRole($role|$name)\nInherited, see \"Maintaining roles\" in User::Identity::Collection\n\n$obj->renameRole( <$role|$oldname>, $newname )\nInherited, see \"Maintaining roles\" in User::Identity::Collection\n\n$obj->sorted()\nInherited, see \"Maintaining roles\" in User::Identity::Collection\n"
                },
                {
                    "name": "Searching",
                    "content": "Extends \"Searching\" in User::Identity::Collection.\n\n$obj->find($name|CODE|undef)\nInherited, see \"Searching\" in User::Identity::Collection\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 create a $type to add this to my collection.\nSome options are specified to create a $type object, which is native to this collection.\nHowever, for some reason this failed.\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: Cannot rename $name into $newname: already exists\nError: Cannot rename $name into $newname: doesn't exist\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\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: Wrong type of role for $collection: requires a $expect but got a $type\nEach $collection groups sets of roles of one specific type ($expect). You cannot add objects\nof a different $type.\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": []
        }
    },
    "summary": "Mail::Box::Collection - a collection of subfolders",
    "flags": [],
    "examples": [],
    "see_also": []
}