{
    "content": [
        {
            "type": "text",
            "text": "# Mail::Message::Head::FieldGroup (perldoc)\n\n## NAME\n\nMail::Message::Head::FieldGroup - a sub set of fields in a header\n\n## SYNOPSIS\n\nNever instantiated directly.\n\n## DESCRIPTION\n\nSome fields have a combined meaning: a set of fields which represent one intermediate step\nduring the transport of the message (a *resent group*, implemented in\nMail::Message::Head::ResentGroup), fields added by mailing list software (implemented in\nMail::Message::Head::ListGroup), or fields added by Spam detection related software (implemented\nby Mail::Message::Head::SpamGroup). Each set of fields can be extracted or added as group with\nobjects which are based on the implementation in this class.\n\n## Sections\n\n- **NAME**\n- **INHERITANCE**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **METHODS** (6 subsections)\n- **DIAGNOSTICS**\n- **SEE ALSO**\n- **LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Mail::Message::Head::FieldGroup",
        "section": "",
        "mode": "perldoc",
        "summary": "Mail::Message::Head::FieldGroup - a sub set of fields in a header",
        "synopsis": "Never instantiated directly.",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "INHERITANCE",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 2,
                "subsections": [
                    {
                        "name": "Constructors",
                        "lines": 46
                    },
                    {
                        "name": "The header",
                        "lines": 44
                    },
                    {
                        "name": "Access to the header",
                        "lines": 13
                    },
                    {
                        "name": "Internals",
                        "lines": 17
                    },
                    {
                        "name": "Error handling",
                        "lines": 50
                    },
                    {
                        "name": "Cleanup",
                        "lines": 5
                    }
                ]
            },
            {
                "name": "DIAGNOSTICS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Mail::Message::Head::FieldGroup - a sub set of fields in a header\n",
                "subsections": []
            },
            "INHERITANCE": {
                "content": "Mail::Message::Head::FieldGroup\nis a Mail::Reporter\n\nMail::Message::Head::FieldGroup is extended by\nMail::Message::Head::ListGroup\nMail::Message::Head::ResentGroup\nMail::Message::Head::SpamGroup\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "Never instantiated directly.\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Some fields have a combined meaning: a set of fields which represent one intermediate step\nduring the transport of the message (a *resent group*, implemented in\nMail::Message::Head::ResentGroup), fields added by mailing list software (implemented in\nMail::Message::Head::ListGroup), or fields added by Spam detection related software (implemented\nby Mail::Message::Head::SpamGroup). Each set of fields can be extracted or added as group with\nobjects which are based on the implementation in this class.\n\nExtends \"DESCRIPTION\" in Mail::Reporter.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "Extends \"METHODS\" in Mail::Reporter.\n",
                "subsections": [
                    {
                        "name": "Constructors",
                        "content": "Extends \"Constructors\" in Mail::Reporter.\n\n$obj->clone()\nMake a copy of this object. The collected fieldnames are copied and the list type\ninformation. No deep copy is made for the header: this is only copied as reference.\n\n$obj->from($head|$message)\nCreate a group of fields based on the specified $message or message $head. This may return\none or more of the objects, which depends on the type of group. Mailing list fields are all\nstored in one object, where resent and spam groups can appear more than once.\n\n$obj->implementedTypes()\nMail::Message::Head::FieldGroup->implementedTypes()\nReturns a list of strings containing all possible return values for type().\n\nMail::Message::Head::FieldGroup->new($fields, %options)\nConstruct an object which maintains one set of header $fields. The $fields may be specified\nas \"Mail::Message::Field\" objects or as key-value pairs. The %options and $fields (as\nkey-value pair) can be mixed: they are distinguished by their name, where the fields always\nstart with a capital. The field objects must aways lead the %options.\n\n-Option  --Defined in     --Default\nhead                       undef\nlog       Mail::Reporter   'WARNINGS'\nsoftware                   undef\ntrace     Mail::Reporter   'WARNINGS'\ntype                       undef\nversion                    undef\n\nhead => HEAD\nThe header HEAD object is used to store the grouped fields in. If no header is specified,\na Mail::Message::Head::Partial is created for you. If you wish to scan the existing fields\nin a header, then use the from() method.\n\nlog => LEVEL\nsoftware => STRING\nName of the software which produced the fields.\n\ntrace => LEVEL\ntype => STRING\nGroup name for the fields. Often the same, or close to the same STRING, as the \"software\"\noption contains.\n\nversion => STRING\nVersion number for the software which produced the fields.\n"
                    },
                    {
                        "name": "The header",
                        "content": "$obj->add( <$field, $value> | $object )\nAdd a field to the header, using the field group. When the field group is already attached\nto a real message header, it will appear in that one as well as being registered in this\nset. If no header is defined, the field only appears internally.\n\nexample: adding a field to a detached list group\n\nmy $this = Mail::Message::Head::ListGroup->new(...);\n$this->add('List-Id' => 'mailbox');\n$msg->addListGroup($this);\n$msg->send;\n\nexample: adding a field to an attached list group\n\nmy $lg = Mail::Message::Head::ListGroup->from($msg);\n$lg->add('List-Id' => 'mailbox');\n\n$obj->addFields( [$fieldnames] )\nAdd some $fieldnames to the set.\n\n$obj->attach($head)\nAdd a group of fields to a message $head. The fields will be cloned(!) into the header, so\nthat the field group object can be used again.\n\nexample: attaching a list group to a message\n\nmy $lg = Mail::Message::Head::ListGroup->new(...);\n$lg->attach($msg->head);\n$msg->head->addListGroup($lg);   # same\n\n$msg->head->addSpamGroup($sg);   # also implemented with attach\n\n$obj->delete()\nRemove all the header lines which are combined in this fields group, from the header.\n\n$obj->fieldNames()\nReturn the names of the fields which are used in this group.\n\n$obj->fields()\nReturn the fields which are defined for this group.\n\n$obj->head()\nReturns the header object, which includes these fields.\n"
                    },
                    {
                        "name": "Access to the header",
                        "content": "$obj->software()\nReturns the name of the software as is defined in the headers. The may be slightly different\nfrom the return value of type(), but usually not too different.\n\n$obj->type()\nReturns an abstract name for the field group; which software is controlling it. \"undef\" is\nreturned in case the type is not known. Valid names are group type dependent: see the\napplicable manual pages. A list of all types can be retrieved with implementedTypes().\n\n$obj->version()\nReturns the version number of the software used to produce the fields. Some kinds of\nsoftware do leave such a trace, other cases will return \"undef\"\n"
                    },
                    {
                        "name": "Internals",
                        "content": "$obj->collectFields( [$name] )\nScan the header for fields which are usually contained in field group with the specified\n$name. For mailinglist groups, you can not specify a $name: only one set of headers will be\nfound (all headers are considered to be produced by exactly one package of mailinglist\nsoftware).\n\nThis method is automatically called when a field group is constructed via from() on an\nexisting header or message.\n\nReturned are the names of the list header fields found, in scalar context the amount of\nfields. An empty list/zero indicates that there was no group to be found.\n\nPlease warn the author of MailBox if you see that to few or too many fields are included.\n\n$obj->detected($type, $software, $version)\nSets the values for the field group type, software, and version, prossibly to \"undef\".\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::Message::Head::FieldGroup->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level,\n$callback] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->details()\nProduce information about the detected/created field group, which may be helpful during\ndebugging. A nicely formatted string is returned.\n\n$obj->errors()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->log( [$level, [$strings]] )\nMail::Message::Head::FieldGroup->log( [$level, [$strings]] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->logPriority($level)\nMail::Message::Head::FieldGroup->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->print( [$fh] )\nPrint the group to the specified $fh or GLOB. This is probably only useful for debugging\npurposed. The output defaults to the selected file handle.\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: 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",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "This module is part of Mail-Message distribution version 3.012, built on February 11, 2022.\nWebsite: http://perl.overmeer.net/CPAN/\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "Copyrights 2001-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": []
            }
        }
    }
}