{
    "mode": "perldoc",
    "parameter": "Mail::Message::Field::Flex",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3AMessage%3A%3AField%3A%3AFlex/json",
    "generated": "2026-06-09T16:42:49Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "Mail::Message::Field::Flex - one line of a message header\n",
            "subsections": []
        },
        "INHERITANCE": {
            "content": "Mail::Message::Field::Flex\nis a Mail::Message::Field\nis a Mail::Reporter\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This is the flexible implementation of a field: it can easily be extended because it stores its\ndata in a hash and the constructor (\"new\") and initializer (\"init\") are split. However, you pay\nthe price in performance. Mail::Message::Field::Fast is faster (as the name predicts).\n\nExtends \"DESCRIPTION\" in Mail::Message::Field.\n",
            "subsections": []
        },
        "OVERLOADED": {
            "content": "Extends \"OVERLOADED\" in Mail::Message::Field.\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",
            "subsections": []
        },
        "METHODS": {
            "content": "Extends \"METHODS\" in Mail::Message::Field.\n",
            "subsections": [
                {
                    "name": "Constructors",
                    "content": "Extends \"Constructors\" in Mail::Message::Field.\n\n$obj->clone()\nInherited, see \"Constructors\" in Mail::Message::Field\n\nMail::Message::Field::Flex->new($data)\nIf you stick to this flexible class of header fields, you have a bit more facilities than\nwith Mail::Message::Field::Fast. Amongst it, you can specify options with the creation.\nPossible arguments:\n\n*   new LINE\n\nass 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|OBJECTS), [ATTRIBUTES], OPTIONS\n\nA set of values which shape the line.\n\nTo be able to distinguish the different parameters, you will have to specify the OPTIONS as\nARRAY of option pairs, or HASH of options. The ATTRIBUTES are a flat list of key-value\npairs. The body is specified as one BODY string, one OBJECT, or a reference to an array of\nOBJECTS. See Mail::Message::Field:\n\n-Option    --Defined in     --Default\nattributes                   []\ncomment                      undef\nlog         Mail::Reporter   'WARNINGS'\ntrace       Mail::Reporter   'WARNINGS'\n\nattributes => ATTRS\nReference to array with list of key-value pairs representing attributes, or reference to a\nhash containing these pairs. This is an alternative notation for specifying ATTRIBUTES\ndirectly as method arguments.\n\ncomment => STRING\nA pre-formatted list of attributes.\n\nlog => LEVEL\ntrace => LEVEL\n"
                },
                {
                    "name": "The field",
                    "content": "Extends \"The field\" in Mail::Message::Field.\n\n$obj->isStructured()\nMail::Message::Field::Flex->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.\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.\n\n$obj->body()\nInherited, see \"Access to the body\" in Mail::Message::Field\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::Flex->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.\n\n$obj->addresses()\nInherited, see \"Access to the content\" in Mail::Message::Field\n\n$obj->attribute( $name, [$value] )\nInherited, see \"Access to the content\" in Mail::Message::Field\n\n$obj->attributes()\nInherited, see \"Access to the content\" in Mail::Message::Field\n\n$obj->comment( [STRING] )\nInherited, see \"Access to the content\" in Mail::Message::Field\n\n$obj->study()\nInherited, see \"Access to the content\" in Mail::Message::Field\n\n$obj->toDate( [$time] )\nMail::Message::Field::Flex->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.\n\n$obj->dateToTimestamp(STRING)\nMail::Message::Field::Flex->dateToTimestamp(STRING)\nInherited, see \"Other methods\" in Mail::Message::Field\n"
                },
                {
                    "name": "Internals",
                    "content": "Extends \"Internals\" in Mail::Message::Field.\n\n$obj->consume( $line | <$name,<$body|$objects>> )\nInherited, see \"Internals\" in Mail::Message::Field\n\n$obj->defaultWrapLength( [$length] )\nInherited, see \"Internals\" in Mail::Message::Field\n\n$obj->fold( $name, $body, [$maxchars] )\nMail::Message::Field::Flex->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": "Error handling",
                    "content": "Extends \"Error handling\" in Mail::Message::Field.\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::Flex->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level, $callback]\n)\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::Flex->log( [$level, [$strings]] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->logPriority($level)\nMail::Message::Field::Flex->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.\n\n$obj->DESTROY()\nInherited, see \"Cleanup\" in Mail::Reporter\n"
                }
            ]
        },
        "DETAILS": {
            "content": "Extends \"DETAILS\" in Mail::Message::Field.\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 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\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": []
        }
    },
    "summary": "Mail::Message::Field::Flex - one line of a message header",
    "flags": [],
    "examples": [],
    "see_also": []
}