{
    "content": [
        {
            "type": "text",
            "text": "# Email::Simple::Header (perldoc)\n\n## NAME\n\nEmail::Simple::Header - the header of an Email::Simple message\n\n## SYNOPSIS\n\nmy $email = Email::Simple->new($text);\nmy $header = $email->headerobj;\nprint $header->asstring;\n\n## DESCRIPTION\n\nThis method implements the headers of an Email::Simple object. It is a very minimal interface,\nand is mostly for private consumption at the moment.\n\n## Sections\n\n- **NAME**\n- **VERSION**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **METHODS**\n- **AUTHORS**\n- **COPYRIGHT AND LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Email::Simple::Header",
        "section": "",
        "mode": "perldoc",
        "summary": "Email::Simple::Header - the header of an Email::Simple message",
        "synopsis": "my $email = Email::Simple->new($text);\nmy $header = $email->headerobj;\nprint $header->asstring;",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 68,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENSE",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Email::Simple::Header - the header of an Email::Simple message\n",
                "subsections": []
            },
            "VERSION": {
                "content": "version 2.216\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "my $email = Email::Simple->new($text);\n\nmy $header = $email->headerobj;\nprint $header->asstring;\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This method implements the headers of an Email::Simple object. It is a very minimal interface,\nand is mostly for private consumption at the moment.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "new\nmy $header = Email::Simple::Header->new($head, \\%arg);\n\n$head is a string containing a valid email header, or a reference to such a string. If a\nreference is passed in, don't expect that it won't be altered.\n\nValid arguments are:\n\ncrlf - the header's newline; defaults to CRLF\n\nasstring\nmy $string = $header->asstring(\\%arg);\n\nThis returns a stringified version of the header.\n\nheadernames\nThis method returns a list of the unique header names found in this header, in no particular\norder.\n\nheaderrawpairs\nmy @pairs = $header->headerrawpairs;\nmy $firstname  = $pairs[0];\nmy $firstvalue = $pairs[1];\n\nThis method returns a list of all the field/value pairs in the header, in the order that they\nappear in the header. (Remember: don't try assigning that to a hash. Some fields may appear more\nthan once!)\n\nheaderpairs\nheaderpairs is another name for headerrawpairs, which was the original name for the method\nand which you'll see most often. In general, though, it's better to be explicit and use\nheaderrawpairs. (In Email::MIME, headerstrpairs exists for letting the library do the header\ndecoding for you.)\n\nheaderraw\nmy $firstvalue = $header->headerraw($field);\nmy $nthvalue   = $header->headerraw($field, $index);\nmy @allvalues  = $header->headerraw($field);\n\nThis method returns the value or values of the given header field. If the named field does not\nappear in the header, this method returns false.\n\nheader\nThis method just calls \"headerraw\". It's the older name for \"headerraw\", but it can be a\nproblem because Email::MIME, a subclass of Email::Simple, makes \"header\" return the header's\ndecoded value.\n\nheaderrawset\n$header->headerrawset($field => @values);\n\nThis method updates the value of the given header. Existing headers have their values set in\nplace. Additional headers are added at the end. If no values are given to set, the header will\nbe removed from to the message entirely.\n\nheaderset\nheaderset is another name for headerrawset, which was the original name for the method and\nwhich you'll see most often. In general, though, it's better to be explicit and use\nheaderrawset. (In Email::MIME, headerstrset exists for letting the library do the header\nencoding for you.)\n\nheaderrawprepend\n$header->headerrawprepend($field => $value);\n\nThis method adds a new instance of the name field as the first field in the header.\n\ncrlf\nThis method returns the newline string used in the header.\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "*   Simon Cozens\n\n*   Casey West\n\n*   Ricardo SIGNES\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENSE": {
                "content": "This software is copyright (c) 2003 by Simon Cozens.\n\nThis is free software; you can redistribute it and/or modify it under the same terms as the Perl\n5 programming language system itself.\n",
                "subsections": []
            }
        }
    }
}