.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "Mail::Message::Field::Fast 3" .TH Mail::Message::Field::Fast 3 2026-04-11 "perl v5.42.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Mail::Message::Field::Fast \- one line of a message header .SH INHERITANCE .IX Header "INHERITANCE" .Vb 3 \& Mail::Message::Field::Fast \& is a Mail::Message::Field \& is a Mail::Reporter .Ve .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& See Mail::Message::Field .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This is the faster, but less flexible implementation of a header field. The data is stored in an array, and some hacks are made to speeds things up. Be gentle with me, and consider that each message contains many of these lines, so speed is very important here. .PP Extends "DESCRIPTION" in Mail::Message::Field. .SH OVERLOADED .IX Header "OVERLOADED" Extends "OVERLOADED" in Mail::Message::Field. .IP "overload: \fB\*(Aq""""\*(Aq\fR stringification" 4 .IX Item "overload: '""""' stringification" Inherited, see "OVERLOADED" in Mail::Message::Field .IP "overload: \fB\*(Aq0+\*(Aq\fR numification" 4 .IX Item "overload: '0+' numification" Inherited, see "OVERLOADED" in Mail::Message::Field .IP "overload: \fB\*(Aq<=\fR\*(Aq> numeric comparison" 4 .IX Item "overload: '<='> numeric comparison" Inherited, see "OVERLOADED" in Mail::Message::Field .IP "overload: \fBbool\fR boolean" 4 .IX Item "overload: bool boolean" Inherited, see "OVERLOADED" in Mail::Message::Field .IP "overload: \fBcmp\fR string comparison" 4 .IX Item "overload: cmp string comparison" Inherited, see "OVERLOADED" in Mail::Message::Field .SH METHODS .IX Header "METHODS" Extends "METHODS" in Mail::Message::Field. .SS Constructors .IX Subsection "Constructors" Extends "Constructors" in Mail::Message::Field. .ie n .IP $obj\->\fBclone\fR() 4 .el .IP \f(CW$obj\fR\->\fBclone\fR() 4 .IX Item "$obj->clone()" Inherited, see "Constructors" in Mail::Message::Field .ie n .IP "$class\->\fBnew\fR(($line | $name, $body, [$attributes]), %options)" 4 .el .IP "\f(CW$class\fR\->\fBnew\fR(($line | \f(CW$name\fR, \f(CW$body\fR, [$attributes]), \f(CW%options\fR)" 4 .IX Item "$class->new(($line | $name, $body, [$attributes]), %options)" The constructor of this object does not follow the usual practise within the Mail::Box suite: it does not use the constructor \&\fBMail::Reporter::new()\fR. .Sp The method can be used in one of the following ways: .RS 4 .IP \(bu 4 \&\fBnew\fR(\f(CW$line\fR, \f(CW%options\fR) .Sp Pass a \f(CW$line\fR as it could be found in a file: a (possibly folded) line which is terminated by a new\-line. .IP \(bu 4 \&\fBnew\fR(\f(CW$name\fR, \f(CW$body\fR, [\f(CW$attributes\fR], \f(CW%options\fR) .Sp A set of values which shape the line. .RE .RS 4 .Sp Create a new header field object. Specify the whole \f(CW$line\fR (encoded octets) at once, and it will be split\-up for you. I case you already have the parts of the header line, you may specify them separately as \&\f(CW$name\fR and field \f(CW$body\fR. .Sp In case you specify a single \f(CW$body\fR 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 \f(CW\*(C`format\*(C'\fR 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. .Sp The \f(CW$attributes\fR can be exactly one string which may contain multiple attributes at once, quoted and formatted as required in RFC2822. As alternative, 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 .Sp ยป example: .Sp .Vb 2 \& my $mime = Mail::Message::Field\->new( \& \*(AqContent\-Type: text/plain; charset=US\-ASCII\*(Aq); \& \& my $mime = Mail::Message::Field\->new( \& \*(AqContent\-Type\*(Aq => \*(Aqtext/plain; charset=US\-ASCII\*(Aq); \& \& my $mime = Mail::Message::Field\->new( \& \*(AqContent\-Type\*(Aq => \*(Aqtext/plain\*(Aq, \*(Aqcharset=US\-ASCII\*(Aq); \& \& my $mime = Mail::Message::Field\->new( \& \*(AqContent\-Type\*(Aq => \*(Aqtext/plain\*(Aq, charset => \*(AqLatin1\*(Aq); \& \& my $mime = Mail::Message::Field\->new( \& To => Mail::Address\->new(\*(AqMy\*(Aq, \*(Aqme@example.com\*(Aq); \& \& my $mime = Mail::Message::Field\->new( Cc => [ \& Mail::Address\->new(\*(AqYou\*(Aq, \*(Aqyou@example.com\*(Aq), \& Mail::Address\->new(\*(AqHis\*(Aq, \*(Aqhe@example.com\*(Aq) \& ]); .Ve .Sp But in practice, you can simply call .Sp .Vb 2 \& my $head = Mail::Message::Head\->new; \& $head\->add( \*(AqContent\-Type\*(Aq => \*(Aqtext/plain\*(Aq, charset => \*(Aqutf8\*(Aq); .Ve .Sp which implicitly calls this constructor (when needed). You can specify the same things for \fBMail::Message::Head::Complete::add()\fR as this \&\f(CW\*(C`new\*(C'\fR accepts. .RE .SS Attributes .IX Subsection "Attributes" Extends "Attributes" in Mail::Message::Field. .ie n .IP $obj\->\fBName\fR() 4 .el .IP \f(CW$obj\fR\->\fBName\fR() 4 .IX Item "$obj->Name()" Inherited, see "Attributes" in Mail::Message::Field .ie n .IP $obj\->\fBbody\fR() 4 .el .IP \f(CW$obj\fR\->\fBbody\fR() 4 .IX Item "$obj->body()" Inherited, see "Attributes" in Mail::Message::Field .ie n .IP $obj\->\fBfolded\fR() 4 .el .IP \f(CW$obj\fR\->\fBfolded\fR() 4 .IX Item "$obj->folded()" Inherited, see "Attributes" in Mail::Message::Field .ie n .IP "$obj\->\fBfoldedBody\fR( [$body] )" 4 .el .IP "\f(CW$obj\fR\->\fBfoldedBody\fR( [$body] )" 4 .IX Item "$obj->foldedBody( [$body] )" Inherited, see "Attributes" in Mail::Message::Field .ie n .IP $obj\->\fBname\fR() 4 .el .IP \f(CW$obj\fR\->\fBname\fR() 4 .IX Item "$obj->name()" Inherited, see "Attributes" in Mail::Message::Field .ie n .IP "$obj\->\fBunfoldedBody\fR( [$body, [$wrap]] )" 4 .el .IP "\f(CW$obj\fR\->\fBunfoldedBody\fR( [$body, [$wrap]] )" 4 .IX Item "$obj->unfoldedBody( [$body, [$wrap]] )" Inherited, see "Attributes" in Mail::Message::Field .ie n .IP "$obj\->\fBwellformedName\fR( [STRING] )" 4 .el .IP "\f(CW$obj\fR\->\fBwellformedName\fR( [STRING] )" 4 .IX Item "$obj->wellformedName( [STRING] )" Inherited, see "Attributes" in Mail::Message::Field .SS "The field" .IX Subsection "The field" Extends "The field" in Mail::Message::Field. .ie n .IP "$any\->\fBisStructured\fR( [$name] )" 4 .el .IP "\f(CW$any\fR\->\fBisStructured\fR( [$name] )" 4 .IX Item "$any->isStructured( [$name] )" Inherited, see "The field" in Mail::Message::Field .ie n .IP $obj\->\fBlength\fR() 4 .el .IP \f(CW$obj\fR\->\fBlength\fR() 4 .IX Item "$obj->length()" Inherited, see "The field" in Mail::Message::Field .ie n .IP $obj\->\fBnrLines\fR() 4 .el .IP \f(CW$obj\fR\->\fBnrLines\fR() 4 .IX Item "$obj->nrLines()" Inherited, see "The field" in Mail::Message::Field .ie n .IP "$obj\->\fBprint\fR( [$fh] )" 4 .el .IP "\f(CW$obj\fR\->\fBprint\fR( [$fh] )" 4 .IX Item "$obj->print( [$fh] )" Inherited, see "The field" in Mail::Message::Field .ie n .IP $obj\->\fBsize\fR() 4 .el .IP \f(CW$obj\fR\->\fBsize\fR() 4 .IX Item "$obj->size()" Inherited, see "The field" in Mail::Message::Field .ie n .IP "$obj\->\fBstring\fR( [$wrap] )" 4 .el .IP "\f(CW$obj\fR\->\fBstring\fR( [$wrap] )" 4 .IX Item "$obj->string( [$wrap] )" Inherited, see "The field" in Mail::Message::Field .ie n .IP $obj\->\fBtoDisclose\fR() 4 .el .IP \f(CW$obj\fR\->\fBtoDisclose\fR() 4 .IX Item "$obj->toDisclose()" Inherited, see "The field" in Mail::Message::Field .SS "Access to the content" .IX Subsection "Access to the content" Extends "Access to the content" in Mail::Message::Field. .ie n .IP $obj\->\fBaddresses\fR() 4 .el .IP \f(CW$obj\fR\->\fBaddresses\fR() 4 .IX Item "$obj->addresses()" Inherited, see "Access to the content" in Mail::Message::Field .ie n .IP "$obj\->\fBattribute\fR( $name, [$value] )" 4 .el .IP "\f(CW$obj\fR\->\fBattribute\fR( \f(CW$name\fR, [$value] )" 4 .IX Item "$obj->attribute( $name, [$value] )" Inherited, see "Access to the content" in Mail::Message::Field .ie n .IP $obj\->\fBattributes\fR() 4 .el .IP \f(CW$obj\fR\->\fBattributes\fR() 4 .IX Item "$obj->attributes()" Inherited, see "Access to the content" in Mail::Message::Field .ie n .IP "$obj\->\fBcomment\fR( [STRING] )" 4 .el .IP "\f(CW$obj\fR\->\fBcomment\fR( [STRING] )" 4 .IX Item "$obj->comment( [STRING] )" Inherited, see "Access to the content" in Mail::Message::Field .ie n .IP $any\->\fBdateToTimestamp\fR(STRING) 4 .el .IP \f(CW$any\fR\->\fBdateToTimestamp\fR(STRING) 4 .IX Item "$any->dateToTimestamp(STRING)" Inherited, see "Access to the content" in Mail::Message::Field .ie n .IP "$any\->\fBstripCFWS\fR( [STRING] )" 4 .el .IP "\f(CW$any\fR\->\fBstripCFWS\fR( [STRING] )" 4 .IX Item "$any->stripCFWS( [STRING] )" Inherited, see "Access to the content" in Mail::Message::Field .ie n .IP $obj\->\fBstudy\fR() 4 .el .IP \f(CW$obj\fR\->\fBstudy\fR() 4 .IX Item "$obj->study()" Inherited, see "Access to the content" in Mail::Message::Field .ie n .IP "$any\->\fBtoDate\fR( [$time] )" 4 .el .IP "\f(CW$any\fR\->\fBtoDate\fR( [$time] )" 4 .IX Item "$any->toDate( [$time] )" Inherited, see "Access to the content" in Mail::Message::Field .ie n .IP $obj\->\fBtoInt\fR() 4 .el .IP \f(CW$obj\fR\->\fBtoInt\fR() 4 .IX Item "$obj->toInt()" Inherited, see "Access to the content" in Mail::Message::Field .SS Parsing .IX Subsection "Parsing" Extends "Parsing" in Mail::Message::Field. .ie n .IP "$obj\->\fBconsume\fR( $line | <$name,<$body|$objects>> )" 4 .el .IP "\f(CW$obj\fR\->\fBconsume\fR( \f(CW$line\fR | <$name,<$body|$objects>> )" 4 .IX Item "$obj->consume( $line | <$name,<$body|$objects>> )" Inherited, see "Parsing" in Mail::Message::Field .ie n .IP "$obj\->\fBdefaultWrapLength\fR( [$length] )" 4 .el .IP "\f(CW$obj\fR\->\fBdefaultWrapLength\fR( [$length] )" 4 .IX Item "$obj->defaultWrapLength( [$length] )" Inherited, see "Parsing" in Mail::Message::Field .ie n .IP "$any\->\fBfold\fR( $name, $body, [$maxchars] )" 4 .el .IP "\f(CW$any\fR\->\fBfold\fR( \f(CW$name\fR, \f(CW$body\fR, [$maxchars] )" 4 .IX Item "$any->fold( $name, $body, [$maxchars] )" Inherited, see "Parsing" in Mail::Message::Field .ie n .IP "$obj\->\fBsetWrapLength\fR( [$length] )" 4 .el .IP "\f(CW$obj\fR\->\fBsetWrapLength\fR( [$length] )" 4 .IX Item "$obj->setWrapLength( [$length] )" Inherited, see "Parsing" in Mail::Message::Field .ie n .IP $obj\->\fBstringifyData\fR(STRING|ARRAY|$objects) 4 .el .IP \f(CW$obj\fR\->\fBstringifyData\fR(STRING|ARRAY|$objects) 4 .IX Item "$obj->stringifyData(STRING|ARRAY|$objects)" Inherited, see "Parsing" in Mail::Message::Field .ie n .IP $obj\->\fBunfold\fR(STRING) 4 .el .IP \f(CW$obj\fR\->\fBunfold\fR(STRING) 4 .IX Item "$obj->unfold(STRING)" Inherited, see "Parsing" in Mail::Message::Field .SS "Error handling" .IX Subsection "Error handling" Extends "Error handling" in Mail::Message::Field. .ie n .IP $obj\->\fBAUTOLOAD\fR() 4 .el .IP \f(CW$obj\fR\->\fBAUTOLOAD\fR() 4 .IX Item "$obj->AUTOLOAD()" Inherited, see "Error handling" in Mail::Reporter .ie n .IP $obj\->\fBnotImplemented\fR() 4 .el .IP \f(CW$obj\fR\->\fBnotImplemented\fR() 4 .IX Item "$obj->notImplemented()" Inherited, see "Error handling" in Mail::Reporter .SS Cleanup .IX Subsection "Cleanup" Extends "Cleanup" in Mail::Message::Field. .ie n .IP $obj\->\fBDESTROY\fR() 4 .el .IP \f(CW$obj\fR\->\fBDESTROY\fR() 4 .IX Item "$obj->DESTROY()" Inherited, see "Cleanup" in Mail::Reporter .SH DETAILS .IX Header "DETAILS" Extends "DETAILS" in Mail::Message::Field. .SH DIAGNOSTICS .IX Header "DIAGNOSTICS" .ie n .IP "Error: class $package does not implement method $method." 4 .el .IP "Error: class \f(CW$package\fR does not implement method \f(CW$method\fR." 4 .IX Item "Error: class $package does not implement method $method." Fatal error: the specific \f(CW$package\fR (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 by \f(CWnotImplemented()\fR .ie n .IP "Warning: field content is not numerical: $content" 4 .el .IP "Warning: field content is not numerical: \f(CW$content\fR" 4 .IX Item "Warning: field content is not numerical: $content" The numeric value of a field is requested (for instance the \f(CW\*(C`Lines\*(C'\fR or \&\f(CW\*(C`Content\-Length\*(C'\fR fields should be numerical), however the data contains weird characters. Cast by \f(CWtoInt()\fR .ie n .IP "Error: field name too long (max $count), in \*(Aq$name\*(Aq." 4 .el .IP "Error: field name too long (max \f(CW$count\fR), in \*(Aq$name\*(Aq." 4 .IX Item "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 \f(CWfold()\fR .ie n .IP "Warning: illegal character in field name $name." 4 .el .IP "Warning: illegal character in field name \f(CW$name\fR." 4 .IX Item "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. Cast by \f(CWconsume()\fR .SH "SEE ALSO" .IX Header "SEE ALSO" This module is part of Mail\-Message version 4.05, built on April 10, 2026. Website: \fIhttp://perl.overmeer.net/mailbox/\fR .SH LICENSE .IX Header "LICENSE" For contributors see file ChangeLog. .PP This software is copyright (c) 2001\-2026 by Mark Overmeer. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.