Mail::M...d::Fast(3)
π Mail::M...d::Fast(3) β User Contributed Perl Documentation π
okay bestie, welcome to Mail::M...d::Fast, aka one line of a message header β¨ the manual page is literally titled that, and yes, it's giving "small module, big feelings." no cap.
π NAME π
Mail::Message::Field::Fast β one line of a message header πΈ
π INHERITANCE π
Mail::Message::Field::Fast
is a Mail::Message::Field
is a Mail::Reporter
so it's in the family tree, it's got ancestors, it's got lore π
β¨ SYNOPSIS β¨
See Mail::Message::Field
that's it. that's the synopsis. go read your other bestie's page, iykyk π«Ά
π¦ DESCRIPTION π¦
okay so. this is the faster, but less flexible implementation of a header field. the data lives in an array, and some hacks were made to speed things up π₯ like, actual hacks, don't look too closely. be gentle with me bestie, and consider that every single message contains many of these lines, so speed is literally the whole point here. it's giving main character energy in the performance department.
Extends "DESCRIPTION" in Mail::Message::Field.
π OVERLOADED π
Extends "OVERLOADED" in Mail::Message::Field.
- overload:
'""'stringification β Inherited, see "OVERLOADED" in Mail::Message::Field β¨ - overload:
'0+'numification β Inherited, see "OVERLOADED" in Mail::Message::Field β¨ - overload:
'<='>numeric comparison β Inherited, see "OVERLOADED" in Mail::Message::Field β¨ - overload: bool boolean β Inherited, see "OVERLOADED" in Mail::Message::Field β¨
- overload: 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, [$attributes]), %options)β bestie. okay. listen. the constructor of this object does NOT follow the usual practice within the Mail::Box suite: it does not use the constructorMail::Reporter::new(). it's different, it's special, it's got its own vibe π
the method can be used in one of the following ways:
new($line, %options)β pass a$lineas it could be found in a file: a (possibly folded) line which is terminated by a new-line. πnew($name, $body, [$attributes], %options)β a set of values which shape the line. β¨
create a new header field object. specify the whole $line (encoded octets) at once, and it will be split-up for you. in case you already have the parts of the header line, you may specify them separately as $name and field $body.
in case you specify a single $body object, or an ARRAY of objects, these are processed to become suitable to fill a field, usually by simple strification. when you specify one or more Mail::Address objects, these are transformed into a string using their format method. you may also add one Mail::Message::Field, whose body is taken. in case of an array, the elements are joined into one string with a comma. π
the $attributes can be exactly one string which may contain multiple attributes at once, quoted and formatted as required in RFC2822. as an alternative, a list of key-value pairs can be used. in this case, the values will get quoted if needed and everything formatted as the protocol demands. improves base, see "Constructors" in Mail::Message::Field π
Β» example: π
my $mime = Mail::Message::Field->new(
'Content-Type: text/plain; charset=US-ASCII');
my $mime = Mail::Message::Field->new(
'Content-Type' => 'text/plain; charset=US-ASCII');
my $mime = Mail::Message::Field->new(
'Content-Type' => 'text/plain', 'charset=US-ASCII');
my $mime = Mail::Message::Field->new(
'Content-Type' => 'text/plain', charset => 'Latin1');
my $mime = Mail::Message::Field->new(
To => Mail::Address->new('My', 'me@example.com');
my $mime = Mail::Message::Field->new( Cc => [
Mail::Address->new('You', 'you@example.com'),
Mail::Address->new('His', 'he@example.com')
]);
but in practice, you can simply call
my $head = Mail::Message::Head->new;
$head->add( 'Content-Type' => 'text/plain', charset => 'utf8');
which implicitly calls this constructor (when needed). you can specify the same things for Mail::Message::Head::Complete::add() as this new accepts. so basically it's the same energy, just indirect π
πΈ 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 $package does 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 the
"Lines"or"Content-Length"fields 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 by
fold() - 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. yes, extinguish. your whole message. gone. Cast by
consume()
πΈ 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. slay. periodt. π β¨
and that's the whole page bestie π«Ά it's perl v5.42.0, dated 2026-02-05, and yes the footer says Mail::M...d::Fast(3) β mwah, go forth and parse some headers πππ¦
π¦ 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