.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45) .\" .\" 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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . 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 .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "Mail::Box::Collection 3" .TH Mail::Box::Collection 3 2026-04-11 "perl v5.42.2" "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 Mail::Box::Collection \- a collection of subfolders .SH INHERITANCE .IX Header "INHERITANCE" .Vb 3 \& Mail::Box::Collection \& is a User::Identity::Collection \& is a User::Identity::Item \& \& Mail::Box::Collection \& is a Mail::Reporter .Ve .SH SYNOPSIS .IX Header "SYNOPSIS" .SH DESCRIPTION .IX Header "DESCRIPTION" The Mail::Box::Collection object maintains a set Mail::Box::Identity objects, each describing a the location of a single mailbox (folder). The collection is used by the Mail::Box::Manage::User object to administer the folders of a single user, even if those folders are closed. .PP Extends "DESCRIPTION" in Mail::Reporter. .PP Extends "DESCRIPTION" in User::Identity::Collection. .SH OVERLOADED .IX Header "OVERLOADED" Extends "OVERLOADED" in User::Identity::Collection. .IP "overload: \fB\*(Aq""""\*(Aq\fR stringification" 4 .IX Item "overload: '""""' stringification" Inherited, see "OVERLOADED" in User::Identity::Collection .IP "overload: \fB\*(Aq@{}\*(Aq\fR array dereference" 4 .IX Item "overload: '@{}' array dereference" Inherited, see "OVERLOADED" in User::Identity::Collection .SH METHODS .IX Header "METHODS" Extends "METHODS" in Mail::Reporter. .PP Extends "METHODS" in User::Identity::Collection. .SS Constructors .IX Subsection "Constructors" Extends "Constructors" in Mail::Reporter. .PP Extends "Constructors" in User::Identity::Collection. .ie n .IP "$class\->\fBnew\fR( [$name], %options )" 4 .el .IP "\f(CW$class\fR\->\fBnew\fR( [$name], \f(CW%options\fR )" 4 .IX Item "$class->new( [$name], %options )" Inherited, see "Constructors" in Mail::Reporter .Sp .Vb 8 \& \-Option \-\-Defined in \-\-Default \& description User::Identity::Item undef \& folder_type \& item_type User::Identity::Collection Mail::Box::Identity \& manager \& name User::Identity::Item \*(Aqfolders\*(Aq \& parent User::Identity::Item undef \& roles User::Identity::Collection undef .Ve .RS 4 .IP "description => STRING" 2 .IX Item "description => STRING" .PD 0 .ie n .IP "folder_type => $class" 2 .el .IP "folder_type => \f(CW$class\fR" 2 .IX Item "folder_type => $class" .IP "item_type => CLASS" 2 .IX Item "item_type => CLASS" .ie n .IP "manager => $object" 2 .el .IP "manager => \f(CW$object\fR" 2 .IX Item "manager => $object" .PD A pre\-prepared Mail::Box::Manager \f(CW$object\fR (could be a Mail::Box::Manage::User). .IP "name => STRING" 2 .IX Item "name => STRING" .PD 0 .IP "parent => OBJECT" 2 .IX Item "parent => OBJECT" .ie n .IP "roles => $role|\e@roles" 2 .el .IP "roles => \f(CW$role\fR|\e@roles" 2 .IX Item "roles => $role|@roles" .PD .RE .RS 4 .RE .SS Attributes .IX Subsection "Attributes" Extends "Attributes" in Mail::Reporter. .PP Extends "Attributes" in User::Identity::Collection. .ie n .IP $obj\->\fBdescription\fR() 4 .el .IP \f(CW$obj\fR\->\fBdescription\fR() 4 .IX Item "$obj->description()" Inherited, see "Attributes" in User::Identity::Item .ie n .IP "$obj\->\fBfolderType\fR( [$folderclass] )" 4 .el .IP "\f(CW$obj\fR\->\fBfolderType\fR( [$folderclass] )" 4 .IX Item "$obj->folderType( [$folderclass] )" Returns the type of folder (on this location). When specified, then \&\f(CW$folderclass\fR must be a Mail::Box extension. .ie n .IP $obj\->\fBitemType\fR() 4 .el .IP \f(CW$obj\fR\->\fBitemType\fR() 4 .IX Item "$obj->itemType()" Inherited, see "Attributes" in User::Identity::Collection .ie n .IP $obj\->\fBmanager\fR() 4 .el .IP \f(CW$obj\fR\->\fBmanager\fR() 4 .IX Item "$obj->manager()" The Mail::Box::Manager (usually a Mail::Box::Manage::User object), which is handling the opening of folders. .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 "Attributes" in User::Identity::Item .ie n .IP $obj\->\fBroles\fR() 4 .el .IP \f(CW$obj\fR\->\fBroles\fR() 4 .IX Item "$obj->roles()" Inherited, see "Attributes" in User::Identity::Collection .SS Collections .IX Subsection "Collections" Extends "Collections" in User::Identity::Collection. .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 "Collections" 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 "Collections" 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 "Collections" 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 "Collections" 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 "Collections" in User::Identity::Item .ie n .IP $any\->\fBtype\fR() 4 .el .IP \f(CW$any\fR\->\fBtype\fR() 4 .IX Item "$any->type()" Inherited, see "Collections" 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 "Collections" in User::Identity::Item .SS "Maintaining roles" .IX Subsection "Maintaining roles" Extends "Maintaining roles" in User::Identity::Collection. .ie n .IP "$obj\->\fBaddRole\fR($role|([$name], %options))" 4 .el .IP "\f(CW$obj\fR\->\fBaddRole\fR($role|([$name], \f(CW%options\fR))" 4 .IX Item "$obj->addRole($role|([$name], %options))" Inherited, see "Maintaining roles" in User::Identity::Collection .ie n .IP $obj\->\fBremoveRole\fR($role|$name) 4 .el .IP \f(CW$obj\fR\->\fBremoveRole\fR($role|$name) 4 .IX Item "$obj->removeRole($role|$name)" Inherited, see "Maintaining roles" in User::Identity::Collection .ie n .IP "$obj\->\fBrenameRole\fR( <$role|$oldname>, $newname )" 4 .el .IP "\f(CW$obj\fR\->\fBrenameRole\fR( <$role|$oldname>, \f(CW$newname\fR )" 4 .IX Item "$obj->renameRole( <$role|$oldname>, $newname )" Inherited, see "Maintaining roles" in User::Identity::Collection .ie n .IP $obj\->\fBsorted\fR() 4 .el .IP \f(CW$obj\fR\->\fBsorted\fR() 4 .IX Item "$obj->sorted()" Inherited, see "Maintaining roles" in User::Identity::Collection .SS Searching .IX Subsection "Searching" Extends "Searching" in User::Identity::Collection. .ie n .IP $obj\->\fBfind\fR($name|CODE|undef) 4 .el .IP \f(CW$obj\fR\->\fBfind\fR($name|CODE|undef) 4 .IX Item "$obj->find($name|CODE|undef)" Inherited, see "Searching" in User::Identity::Collection .SS "Error handling" .IX Subsection "Error handling" Extends "Error handling" in Mail::Reporter. .ie n .IP $obj\->\fBAUTOLOAD\fR() 4 .el .IP \f(CW$obj\fR\->\fBAUTOLOAD\fR() 4 .IX Item "$obj->AUTOLOAD()" Inherited, see "Error handling" in Mail::Reporter .ie n .IP $obj\->\fBnotImplemented\fR() 4 .el .IP \f(CW$obj\fR\->\fBnotImplemented\fR() 4 .IX Item "$obj->notImplemented()" Inherited, see "Error handling" in Mail::Reporter .SS Cleanup .IX Subsection "Cleanup" Extends "Cleanup" in Mail::Reporter. .ie n .IP $obj\->\fBDESTROY\fR() 4 .el .IP \f(CW$obj\fR\->\fBDESTROY\fR() 4 .IX Item "$obj->DESTROY()" Inherited, see "Cleanup" in Mail::Reporter .SH DIAGNOSTICS .IX Header "DIAGNOSTICS" .ie n .IP "Error: cannot create a $type to add this to my collection." 4 .el .IP "Error: cannot create a \f(CW$type\fR to add this to my collection." 4 .IX Item "Error: cannot create a $type to add this to my collection." Some options are specified to create a \f(CW$type\fR object, which is native to this collection. However, for some reason this failed. Cast by \f(CWaddRole()\fR .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 \*(Aqrequire\*(Aq the package which defines the nickname. Cast by \f(CWaddCollection()\fR .ie n .IP "Error: cannot rename $from into $to: already exists." 4 .el .IP "Error: cannot rename \f(CW$from\fR into \f(CW$to:\fR already exists." 4 .IX Item "Error: cannot rename $from into $to: already exists." Cast by \f(CWrenameRole()\fR .ie n .IP "Error: cannot rename $from into $to: doesn\*(Aqt exist." 4 .el .IP "Error: cannot rename \f(CW$from\fR into \f(CW$to:\fR doesn\*(Aqt exist." 4 .IX Item "Error: cannot rename $from into $to: doesn't exist." Cast by \f(CWrenameRole()\fR .ie n .IP "Error: class $package does not implement method $method." 4 .el .IP "Error: class \f(CW$package\fR does not implement method \f(CW$method\fR." 4 .IX Item "Error: class $package does not implement method $method." Fatal error: the specific \f(CW$package\fR (or one of its superclasses) does not implement this method where it should. This message means that some other related classes do implement this method however the class at hand does not. Probably you should investigate this and probably inform the author of the package. Cast by \f(CWnotImplemented()\fR .ie n .IP "Error: invalid collection $name." 4 .el .IP "Error: invalid collection \f(CW$name\fR." 4 .IX Item "Error: invalid collection $name." The collection with \f(CW$name\fR does not exist and can not be created. Cast by \f(CWadd()\fR .ie n .IP "Error: this $object is not a collection." 4 .el .IP "Error: this \f(CW$object\fR is not a collection." 4 .IX Item "Error: this $object is not a collection." Cast by \f(CWaddCollection()\fR .ie n .IP "Error: wrong type of role for $collection: requires a $expect but got a $type." 4 .el .IP "Error: wrong type of role for \f(CW$collection:\fR requires a \f(CW$expect\fR but got a \f(CW$type\fR." 4 .IX Item "Error: wrong type of role for $collection: requires a $expect but got a $type." Each \f(CW$collection\fR groups sets of roles of one specific type (\f(CW$expect\fR). You cannot add objects of a different \f(CW$type\fR. Cast by \f(CWaddRole()\fR .SH "SEE ALSO" .IX Header "SEE ALSO" This module is part of Mail\-Box version 4.02, built on April 10, 2026. Website: \fIhttp://perl.overmeer.net/CPAN/\fR .SH LICENSE .IX Header "LICENSE" For contributors see file ChangeLog. .PP This software is copyright (c) 2001\-2026 by Mark Overmeer. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.