{
    "content": [
        {
            "type": "text",
            "text": "# Mail::Message::Field::Structured (perldoc)\n\n## NAME\n\nMail::Message::Field::Structured - one line of a structured message header\n\n## SYNOPSIS\n\nmy $f = Mail::Message::Field::Full\n->new('Content-Type' => 'text/html');\nmy @encode = (charset => 'jp', usecontinuations => 1);\n$f->attribute('filename=passwd');\n$f->attribute(filename => 'passwd', @encode);\nmy $attr = Mail::Message::Field::Attribute->new(...);\n$f->attribute($attr);\n\n## DESCRIPTION\n\nExtends \"DESCRIPTION\" in Mail::Message::Field::Full.\n\n## Sections\n\n- **NAME**\n- **INHERITANCE**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OVERLOADED**\n- **METHODS** (10 subsections)\n- **DETAILS**\n- **DIAGNOSTICS**\n- **SEE ALSO**\n- **LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Mail::Message::Field::Structured",
        "section": "",
        "mode": "perldoc",
        "summary": "Mail::Message::Field::Structured - one line of a structured message header",
        "synopsis": "my $f = Mail::Message::Field::Full\n->new('Content-Type' => 'text/html');\nmy @encode = (charset => 'jp', usecontinuations => 1);\n$f->attribute('filename=passwd');\n$f->attribute(filename => 'passwd', @encode);\nmy $attr = Mail::Message::Field::Attribute->new(...);\n$f->attribute($attr);",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "INHERITANCE",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "OVERLOADED",
                "lines": 20,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 2,
                "subsections": [
                    {
                        "name": "Constructors",
                        "lines": 61
                    },
                    {
                        "name": "The field",
                        "lines": 24
                    },
                    {
                        "name": "Access to the name",
                        "lines": 11
                    },
                    {
                        "name": "Access to the body",
                        "lines": 21
                    },
                    {
                        "name": "Access to the content",
                        "lines": 63
                    },
                    {
                        "name": "Other methods",
                        "lines": 6
                    },
                    {
                        "name": "Internals",
                        "lines": 28
                    },
                    {
                        "name": "Parsing",
                        "lines": 22
                    },
                    {
                        "name": "Error handling",
                        "lines": 42
                    },
                    {
                        "name": "Cleanup",
                        "lines": 5
                    }
                ]
            },
            {
                "name": "DETAILS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DIAGNOSTICS",
                "lines": 29,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Mail::Message::Field::Structured - one line of a structured message header\n",
                "subsections": []
            },
            "INHERITANCE": {
                "content": "Mail::Message::Field::Structured\nis a Mail::Message::Field::Full\nis a Mail::Message::Field\nis a Mail::Reporter\n\nMail::Message::Field::Structured is extended by\nMail::Message::Field::Addresses\nMail::Message::Field::AuthResults\nMail::Message::Field::DKIM\nMail::Message::Field::Date\nMail::Message::Field::URIs\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "my $f = Mail::Message::Field::Full\n->new('Content-Type' => 'text/html');\n\nmy @encode = (charset => 'jp', usecontinuations => 1);\n$f->attribute('filename=passwd');\n$f->attribute(filename => 'passwd', @encode);\n\nmy $attr = Mail::Message::Field::Attribute->new(...);\n$f->attribute($attr);\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Extends \"DESCRIPTION\" in Mail::Message::Field::Full.\n",
                "subsections": []
            },
            "OVERLOADED": {
                "content": "Extends \"OVERLOADED\" in Mail::Message::Field::Full.\n\noverload: \"\"\nInherited, see \"OVERLOADED\" in Mail::Message::Field\n\noverload: 0+\nInherited, see \"OVERLOADED\" in Mail::Message::Field\n\noverload: <=>\nInherited, see \"OVERLOADED\" in Mail::Message::Field\n\noverload: bool\nInherited, see \"OVERLOADED\" in Mail::Message::Field\n\noverload: cmp\nInherited, see \"OVERLOADED\" in Mail::Message::Field\n\noverload: stringification\nInherited, see \"OVERLOADED\" in Mail::Message::Field::Full\n",
                "subsections": []
            },
            "METHODS": {
                "content": "Extends \"METHODS\" in Mail::Message::Field::Full.\n",
                "subsections": [
                    {
                        "name": "Constructors",
                        "content": "Extends \"Constructors\" in Mail::Message::Field::Full.\n\n$obj->clone()\nInherited, see \"Constructors\" in Mail::Message::Field\n\nMail::Message::Field::Structured->from($field, %options)\nInherited, see \"Constructors\" in Mail::Message::Field::Full\n\nMail::Message::Field::Structured->new($data)\n\n*   new LINE\n\nPass a LINE as it could be found in a file: a (possibly folded) line which is terminated\nby a new-line.\n\n*   new NAME, BODY, OPTIONS\n\nA set of values which shape the line.\n\nThe NAME is a wellformed header name (you may use wellformedName()) to be sure about the\ncasing. The BODY is a string, one object, or an ref-array of objects. In case of objects,\nthey must fit to the constructor of the field: the types which are accepted may differ. The\noptional ATTRIBUTE list contains Mail::Message::Field::Attribute objects. Finally, there are\nsome OPTIONS.\n\n-Option    --Defined in                --Default\nattributes                              []\ncharset     Mail::Message::Field::Full  undef\ndatum                                   undef\nencoding    Mail::Message::Field::Full  'q'\nforce       Mail::Message::Field::Full  false\nlanguage    Mail::Message::Field::Full  undef\nlog         Mail::Reporter              'WARNINGS'\ntrace       Mail::Reporter              'WARNINGS'\n\nattributes => ATTRS\nThere are various ways to specify these attributes: pass a reference to an array which\nlist of key-value pairs representing attributes, or reference to a hash containing these\npairs, or an array with Mail::Message::Field::Attribute objects.\n\ncharset => STRING\ndatum => STRING\nThe method name *body* is very confusing, even in the RFC. In MailBox, for historical\nreasons, body() returns the part of the field contents before the first semi-colon.\nfoldedBody() and unfoldedBody() address the whole field.\n\nThere is no common name for the piece of data before the parameters (attributes) in the\nfield-content mentioned in the RFCs, so let's call it datum.\n\nencoding => 'q'|'Q'|'b'|'B'\nforce => BOOLEAN\nlanguage => STRING\nlog => LEVEL\ntrace => LEVEL\n\nexample: of a structured field\n\nmy @attrs   = (Mail::Message::Field::Attribute->new(...), ...);\nmy @options = (extra => 'the color blue');\nmy $t = Mail::Message::Field::Full->new(To => \\@addrs, @attrs, @options);\n"
                    },
                    {
                        "name": "The field",
                        "content": "Extends \"The field\" in Mail::Message::Field::Full.\n\n$obj->isStructured()\nMail::Message::Field::Structured->isStructured()\nInherited, see \"The field\" in Mail::Message::Field\n\n$obj->length()\nInherited, see \"The field\" in Mail::Message::Field\n\n$obj->nrLines()\nInherited, see \"The field\" in Mail::Message::Field\n\n$obj->print( [$fh] )\nInherited, see \"The field\" in Mail::Message::Field\n\n$obj->size()\nInherited, see \"The field\" in Mail::Message::Field\n\n$obj->string( [$wrap] )\nInherited, see \"The field\" in Mail::Message::Field\n\n$obj->toDisclose()\nInherited, see \"The field\" in Mail::Message::Field\n"
                    },
                    {
                        "name": "Access to the name",
                        "content": "Extends \"Access to the name\" in Mail::Message::Field::Full.\n\n$obj->Name()\nInherited, see \"Access to the name\" in Mail::Message::Field\n\n$obj->name()\nInherited, see \"Access to the name\" in Mail::Message::Field\n\n$obj->wellformedName( [STRING] )\nInherited, see \"Access to the name\" in Mail::Message::Field\n"
                    },
                    {
                        "name": "Access to the body",
                        "content": "Extends \"Access to the body\" in Mail::Message::Field::Full.\n\n$obj->body()\nInherited, see \"Access to the body\" in Mail::Message::Field\n\n$obj->decodedBody(%options)\nInherited, see \"Access to the body\" in Mail::Message::Field::Full\n\n$obj->folded()\nInherited, see \"Access to the body\" in Mail::Message::Field\n\n$obj->foldedBody( [$body] )\nInherited, see \"Access to the body\" in Mail::Message::Field\n\n$obj->stripCFWS( [STRING] )\nMail::Message::Field::Structured->stripCFWS( [STRING] )\nInherited, see \"Access to the body\" in Mail::Message::Field\n\n$obj->unfoldedBody( [$body, [$wrap]] )\nInherited, see \"Access to the body\" in Mail::Message::Field\n"
                    },
                    {
                        "name": "Access to the content",
                        "content": "Extends \"Access to the content\" in Mail::Message::Field::Full.\n\n$obj->addresses()\nInherited, see \"Access to the content\" in Mail::Message::Field\n\n$obj->attrPairs()\nReturns a list with attribute name and value pairs.\n\n$obj->attribute( $object|<STRING, %options>|<$name,$value,%options> )\nAdd an attribute to the field. The attributes are added left-to-right into the string\nrepresentation of the field, although the order of the attributes is un-important, according\nto the RFCs.\n\nYou may pass a fully prepared Mail::Message::Field::Attribute $object, if you like to do all\npreparations for correct representation of the data yourself. You may also pass one STRING,\nwhich is a fully prepared attribute. This STRING will not be changed, so be careful about\nquoting and encodings.\n\nAs third possibility, you can specify an attribute $name and its $value. An attribute object\nwill be created for you implicitly in both cases where such object is not supplied, passing\nthe %options. See Mail::Message::Field::Attribute::new() about the available %options.\n\nThe attribute object is returned, however, when continuations are used this may be an object\nyou already know about. \"undef\" is returned when construction fails (when the attribute is\nincorrect).\n\nexample:\n\n$f->attribute(filename => 'passwd');\n$f->attribute(filename => 'passwd', usecontinuations => 0);\n\nmy $attr = Mail::Message::Field::Attribute->new(...);\n$f->attribute($attr);\n\n$obj->attributes()\nReturns a list with all attributes, which are all Mail::Message::Field::Attribute objects.\nThe attributes are not ordered in any way. The list may be empty. Double attributes or\ncontinuations are folded into one.\n\n$obj->beautify()\nInherited, see \"Access to the content\" in Mail::Message::Field::Full\n\n$obj->comment( [STRING] )\nInherited, see \"Access to the content\" in Mail::Message::Field\n\n$obj->createComment(STRING, %options)\nMail::Message::Field::Structured->createComment(STRING, %options)\nInherited, see \"Access to the content\" in Mail::Message::Field::Full\n\n$obj->createPhrase(STRING, %options)\nMail::Message::Field::Structured->createPhrase(STRING, %options)\nInherited, see \"Access to the content\" in Mail::Message::Field::Full\n\n$obj->study()\nInherited, see \"Access to the content\" in Mail::Message::Field\n\n$obj->toDate( [$time] )\nMail::Message::Field::Structured->toDate( [$time] )\nInherited, see \"Access to the content\" in Mail::Message::Field\n\n$obj->toInt()\nInherited, see \"Access to the content\" in Mail::Message::Field\n"
                    },
                    {
                        "name": "Other methods",
                        "content": "Extends \"Other methods\" in Mail::Message::Field::Full.\n\n$obj->dateToTimestamp(STRING)\nMail::Message::Field::Structured->dateToTimestamp(STRING)\nInherited, see \"Other methods\" in Mail::Message::Field\n"
                    },
                    {
                        "name": "Internals",
                        "content": "Extends \"Internals\" in Mail::Message::Field::Full.\n\n$obj->consume( $line | <$name,<$body|$objects>> )\nInherited, see \"Internals\" in Mail::Message::Field\n\n$obj->decode(STRING, %options)\nMail::Message::Field::Structured->decode(STRING, %options)\nInherited, see \"Internals\" in Mail::Message::Field::Full\n\n$obj->defaultWrapLength( [$length] )\nInherited, see \"Internals\" in Mail::Message::Field\n\n$obj->encode(STRING, %options)\nInherited, see \"Internals\" in Mail::Message::Field::Full\n\n$obj->fold( $name, $body, [$maxchars] )\nMail::Message::Field::Structured->fold( $name, $body, [$maxchars] )\nInherited, see \"Internals\" in Mail::Message::Field\n\n$obj->setWrapLength( [$length] )\nInherited, see \"Internals\" in Mail::Message::Field\n\n$obj->stringifyData(STRING|ARRAY|$objects)\nInherited, see \"Internals\" in Mail::Message::Field\n\n$obj->unfold(STRING)\nInherited, see \"Internals\" in Mail::Message::Field\n"
                    },
                    {
                        "name": "Parsing",
                        "content": "Extends \"Parsing\" in Mail::Message::Field::Full.\n\n$obj->consumeComment(STRING)\nMail::Message::Field::Structured->consumeComment(STRING)\nInherited, see \"Parsing\" in Mail::Message::Field::Full\n\n$obj->consumeDotAtom(STRING)\nInherited, see \"Parsing\" in Mail::Message::Field::Full\n\n$obj->consumePhrase(STRING)\nMail::Message::Field::Structured->consumePhrase(STRING)\nInherited, see \"Parsing\" in Mail::Message::Field::Full\n\n$obj->datum( [$value] )\nThe part of the field before the semi-colon (\";\").\n\n$obj->parse(STRING)\nInherited, see \"Parsing\" in Mail::Message::Field::Full\n\n$obj->produceBody()\nInherited, see \"Parsing\" in Mail::Message::Field::Full\n"
                    },
                    {
                        "name": "Error handling",
                        "content": "Extends \"Error handling\" in Mail::Message::Field::Full.\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::Field::Structured->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level,\n$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::Message::Field::Structured->log( [$level, [$strings]] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->logPriority($level)\nMail::Message::Field::Structured->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::Message::Field::Full.\n\n$obj->DESTROY()\nInherited, see \"Cleanup\" in Mail::Reporter\n"
                    }
                ]
            },
            "DETAILS": {
                "content": "Extends \"DETAILS\" in Mail::Message::Field::Full.\n",
                "subsections": []
            },
            "DIAGNOSTICS": {
                "content": "Warning: Field content is not numerical: $content\nThe numeric value of a field is requested (for instance the \"Lines\" or \"Content-Length\"\nfields should be numerical), however the data contains weird characters.\n\nWarning: Illegal character in charset '$charset'\nThe field is created with an utf8 string which only contains data from the specified\ncharacter set. However, that character set can never be a valid name because it contains\ncharacters which are not permitted.\n\nWarning: Illegal character in field name $name\nA new field is being created which does contain characters not permitted by the RFCs. Using\nthis field in messages may break other e-mail clients or transfer agents, and therefore\nmutulate or extinguish your message.\n\nWarning: Illegal character in language '$lang'\nThe field is created with data which is specified to be in a certain language, however, the\nname of the language cannot be valid: it contains characters which are not permitted by the\nRFCs.\n\nWarning: Illegal encoding '$encoding', used 'q'\nThe RFCs only permit base64 (\"b \" or \"B \") or quoted-printable (\"q\" or \"Q\") encoding. Other\nthan these four options are illegal.\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",
                "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": []
            }
        }
    }
}