Mail::M...d::Flex(3)
hey bestie π welcome to Mail::M...d::Flex(3), aka the User Contributed Perl Documentation page that lives in your terminal and knows your e-mail headers better than you do. hydrate, sit criss-cross, we're doing this.
β¨ NAME β¨
Mail::Message::Field::Flex β one line of a message header. one (1) line. that's the whole job. iconic behaviour, no notes. π
π INHERITANCE π
Mail::Message::Field::Flex
is a Mail::Message::Field
is a Mail::Reporter
so she's got ancestors, she's got lore, she's got a whole family tree. we love a legacy. π«Ά
π SYNOPSIS π
bestie. there is genuinely nothing here. the original page has the heading and then just... vibes. an empty synopsis. it's giving minimalist. π
π¦ DESCRIPTION π¦
okay so this is the flexible implementation of a field, and the way that it works is: it stores its data in a hash, and the constructor (new) and the initializer (init) are split. so it can be extended super easily. that's the flex. that's literally the flex. π
but β and I need you to hear me on this β you pay the price in performance. that's not me being dramatic, that's just true. Mail::Message::Field::Fast is faster. as the name predicts. the name literally told you. π
Extends "DESCRIPTION" in Mail::Message::Field.
π OVERLOADED π
Extends "OVERLOADED" in Mail::Message::Field.
she does tricks. all inherited, but she does them:
'""'stringification β inherited, see "OVERLOADED" in Mail::Message::Field'0+'numification β inherited, see "OVERLOADED" in Mail::Message::Field'<='>numeric comparison β inherited, see "OVERLOADED" in Mail::Message::Field- bool boolean β inherited, see "OVERLOADED" in Mail::Message::Field
- cmp string comparison β inherited, see "OVERLOADED" in Mail::Message::Field
πΈ METHODS πΈ
Extends "METHODS" in Mail::Message::Field.
π§ Constructors
Extends "Constructors" in Mail::Message::Field.
$obj->clone()β inherited, see "Constructors" in Mail::Message::Field$class->new($line | ($name, ($body|$object|\@objects), [@attributes], [\%options|\@options]))β okay so if you stick to this flexible class of header fields, you get a bit more facilities than withMail::Message::Field::Fast. among the extra stuff: you can specify options right at creation time. possible arguments are down below πnew $lineβ pass a$lineas it could be found in a file: a (possibly folded) line which is terminated by a new-line.new $name, ($body|$object|\@objects), [@attributes], [\%options|\@options]β a set of values which shape the line.
now, to be able to tell the different parameters apart, you will have to specify the @options as an ARRAY of option PAIRS, or a HASH of %options. the @attributes are a flat LIST of key-value PAIRS. the $body is specified as one string, one $object, or an ARRAY of @objects. see Mail::Message::Field. Improves base, see "Constructors" in Mail::Message::Field.
the options + their defaults, untouched, exactly as the page says:
-Option --Default
attributes +[ ]
comment undef
attributes => \@attributes|\%attributesβ an ARRAY which contains key-value pairs representing@attributes, or a reference to a HASH containing these pairs. this is an alternative notation for specifying@attributesdirectly as method arguments. so many ways to say the same thing, we love options πcomment => $textβ a pre-formatted list of attributes.
β Attributes
Extends "Attributes" in Mail::Message::Field.
$obj->Name()β inherited, see "Attributes" in Mail::Message::Field$obj->body()β inherited, see "Attributes" in Mail::Message::Field$obj->folded()β inherited, see "Attributes" in Mail::Message::Field$obj->foldedBody( [$body] )β inherited, see "Attributes" in Mail::Message::Field$obj->name()β inherited, see "Attributes" in Mail::Message::Field$obj->unfoldedBody( [$body, [$wrap]] )β inherited, see "Attributes" in Mail::Message::Field$obj->wellformedName( [STRING] )β inherited, see "Attributes" in Mail::Message::Field
π The field
Extends "The field" in Mail::Message::Field.
$any->isStructured( [$name] )β inherited, see "The field" in Mail::Message::Field$obj->length()β inherited, see "The field" in Mail::Message::Field$obj->nrLines()β inherited, see "The field" in Mail::Message::Field$obj->print( [$fh] )β inherited, see "The field" in Mail::Message::Field$obj->size()β inherited, see "The field" in Mail::Message::Field$obj->string( [$wrap] )β inherited, see "The field" in Mail::Message::Field$obj->toDisclose()β inherited, see "The field" in Mail::Message::Field
π Access to the content
Extends "Access to the content" in Mail::Message::Field.
$obj->addresses()β inherited, see "Access to the content" in Mail::Message::Field$obj->attribute( $name, [$value] )β inherited, see "Access to the content" in Mail::Message::Field$obj->attributes()β inherited, see "Access to the content" in Mail::Message::Field$obj->comment( [STRING] )β inherited, see "Access to the content" in Mail::Message::Field$any->dateToTimestamp(STRING)β inherited, see "Access to the content" in Mail::Message::Field$any->stripCFWS( [STRING] )β inherited, see "Access to the content" in Mail::Message::Field$obj->study()β inherited, see "Access to the content" in Mail::Message::Field$any->toDate( [$time] )β inherited, see "Access to the content" in Mail::Message::Field$obj->toInt()β inherited, see "Access to the content" in Mail::Message::Field
π₯ Parsing
Extends "Parsing" in Mail::Message::Field.
$obj->consume( $line | <$name,<$body|$objects>> )β inherited, see "Parsing" in Mail::Message::Field$obj->defaultWrapLength( [$length] )β inherited, see "Parsing" in Mail::Message::Field$any->fold( $name, $body, [$maxchars] )β inherited, see "Parsing" in Mail::Message::Field$obj->setWrapLength( [$length] )β inherited, see "Parsing" in Mail::Message::Field$obj->stringifyData(STRING|ARRAY|$objects)β inherited, see "Parsing" in Mail::Message::Field$obj->unfold(STRING)β inherited, see "Parsing" in Mail::Message::Field
π Error handling
Extends "Error handling" in Mail::Message::Field.
$obj->AUTOLOAD()β inherited, see "Error handling" in Mail::Reporter$obj->notImplemented()β inherited, see "Error handling" in Mail::Reporter
π§Ό Cleanup
Extends "Cleanup" in Mail::Message::Field.
$obj->DESTROY()β inherited, see "Cleanup" in Mail::Reporter
π DETAILS π
Extends "DETAILS" in Mail::Message::Field.
π DIAGNOSTICS π
- Error: class
$packagedoes not implement method$method. β fatal error, bestie. the specific$package(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 bynotImplemented() - Warning: field content is not numerical:
$contentβ the numeric value of a field is requested (for instance theLinesorContent-Lengthfields should be numerical), however the data contains weird characters. Cast bytoInt() - Error: field name too long (max
$count), in '$name'. β it is not specified in the RFCs how long a field name can be, but at least it should be a few characters shorter than the line wrap. Cast byfold() - Warning: illegal character in field name
$name. β a new field is being created which does contain characters not permitted by the RFCs. using this field in messages may break other e-mail clients or transfer agents, and therefore mutulate or extinguish your message. so like, don't. Cast byconsume()
π SEE ALSO π
this module is part of Mail-Message version 4.04, built on February 04, 2026. website: http://perl.overmeer.net/CPAN/
π LICENSE π
for contributors see file ChangeLog.
this software is copyright (c) 2001-2026 by Mark Overmeer.
this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
okay bestie that's the whole page π and for the cute sign-off: this was perl v5.42.0, dated 2026-02-05, and the manual is Mail::M...d::Flex(3). you ate that. periodt. πβ¨
π¦ where this page comes from
- fedora 44: perl-Mail-Message 4.04-1.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms