1Mail::Message::Field::FUassetr(3C)ontributed Perl DocumeMnatialt:i:oMnessage::Field::Fast(3)
2
3
4

NAME

6       Mail::Message::Field::Fast - one line of a message header
7

INHERITANCE

9        Mail::Message::Field::Fast
10          is a Mail::Message::Field
11          is a Mail::Reporter
12

SYNOPSIS

14        See Mail::Message::Field
15

DESCRIPTION

17       This is the faster, but less flexible implementation of a header field.
18       The data is stored in an array, and some hacks are made to speeds
19       things up.  Be gentle with me, and consider that each message contains
20       many of these lines, so speed is very important here.
21
22       Extends "DESCRIPTION" in Mail::Message::Field.
23

OVERLOADED

25       Extends "OVERLOADED" in Mail::Message::Field.
26
27       overload: ""
28           Inherited, see "OVERLOADED" in Mail::Message::Field
29
30       overload: 0+
31           Inherited, see "OVERLOADED" in Mail::Message::Field
32
33       overload: <=>
34           Inherited, see "OVERLOADED" in Mail::Message::Field
35
36       overload: bool
37           Inherited, see "OVERLOADED" in Mail::Message::Field
38
39       overload: cmp
40           Inherited, see "OVERLOADED" in Mail::Message::Field
41

METHODS

43       Extends "METHODS" in Mail::Message::Field.
44
45   Constructors
46       Extends "Constructors" in Mail::Message::Field.
47
48       $obj->clone()
49           Inherited, see "Constructors" in Mail::Message::Field
50
51       Mail::Message::Field::Fast->new($data)
52           The constructor of this object does not follow the usual practise
53           within the Mail::Box suite: it does not use the constructor
54           Mail::Reporter::new().  Therefor it has no logging or tracing
55           facilities.
56
57           The method can be used in one of the following ways:
58
59new LINE
60
61               Pass a LINE as it could be found in a file: a (possibly folded)
62               line which is terminated by a new-line.
63
64new NAME, (BODY|OBJECTS), [ATTRIBUTES]
65
66               A set of values which shape the line.
67
68           Create a new header field object.  Specify the whole LINE at once,
69           and it will be split-up for you.  I case you already have the parts
70           of the header line, you may specify them separately as NAME and
71           BODY.
72
73           In case you specify a single OBJECT, or a reference to an array of
74           OBJECTS, these objects are processed to become suitable to fill a
75           field, usually by simple strification.  When you specify one or
76           more Mail::Address objects, these are transformed into a string
77           using their "format" method.  You may also add one
78           Mail::Message::Field, whose body is taken.  In case of an array,
79           the elements are joined into one string with a comma.
80
81           ATTRIBUTES can be exactly one string which may contain multiple
82           attributes at once, quoted and formatted as required in RFC2822.
83           As alternative, list of key-value pairs can be used.  In this case,
84           the values will get quoted if needed and everything formatted as
85           the protocol demands.
86
87            -Option--Defined in     --Default
88             log     Mail::Reporter   <disabled>
89             trace   Mail::Reporter   <disabled>
90
91           log => LEVEL
92           trace => LEVEL
93
94           example:
95
96            my $mime = Mail::Message::Field->new(
97             'Content-Type: text/plain; charset=US-ASCII');
98
99            my $mime = Mail::Message::Field->new(
100             'Content-Type' => 'text/plain; charset=US-ASCII');
101
102            my $mime = Mail::Message::Field->new(
103             'Content-Type' => 'text/plain', 'charset=US-ASCII');
104
105            my $mime = Mail::Message::Field->new(
106             'Content-Type' => 'text/plain', charset => 'Latin1');
107
108            my $mime = Mail::Message::Field->new(
109             To => Mail::Address->new('My', 'me@example.com');
110
111            my $mime = Mail::Message::Field->new(
112             Cc => [ Mail::Address->new('You', 'you@example.com')
113                   , Mail::Address->new('His', 'he@example.com')
114                   ]);
115
116           But in practice, you can simply call
117
118            my $head = Mail::Message::Head->new;
119            $head->add( 'Content-Type' => 'text/plain'
120                      , charset => 'utf8');
121
122           which implicitly calls this constructor (when needed).  You can
123           specify the same things for Mail::Message::Head::Complete::add() as
124           this "new" accepts.
125
126   The field
127       Extends "The field" in Mail::Message::Field.
128
129       $obj->isStructured()
130       Mail::Message::Field::Fast->isStructured()
131           Inherited, see "The field" in Mail::Message::Field
132
133       $obj->length()
134           Inherited, see "The field" in Mail::Message::Field
135
136       $obj->nrLines()
137           Inherited, see "The field" in Mail::Message::Field
138
139       $obj->print( [$fh] )
140           Inherited, see "The field" in Mail::Message::Field
141
142       $obj->size()
143           Inherited, see "The field" in Mail::Message::Field
144
145       $obj->string( [$wrap] )
146           Inherited, see "The field" in Mail::Message::Field
147
148       $obj->toDisclose()
149           Inherited, see "The field" in Mail::Message::Field
150
151   Access to the name
152       Extends "Access to the name" in Mail::Message::Field.
153
154       $obj->Name()
155           Inherited, see "Access to the name" in Mail::Message::Field
156
157       $obj->name()
158           Inherited, see "Access to the name" in Mail::Message::Field
159
160       $obj->wellformedName( [STRING] )
161           Inherited, see "Access to the name" in Mail::Message::Field
162
163   Access to the body
164       Extends "Access to the body" in Mail::Message::Field.
165
166       $obj->body()
167           Inherited, see "Access to the body" in Mail::Message::Field
168
169       $obj->folded()
170           Inherited, see "Access to the body" in Mail::Message::Field
171
172       $obj->foldedBody( [$body] )
173           Inherited, see "Access to the body" in Mail::Message::Field
174
175       $obj->stripCFWS( [STRING] )
176       Mail::Message::Field::Fast->stripCFWS( [STRING] )
177           Inherited, see "Access to the body" in Mail::Message::Field
178
179       $obj->unfoldedBody( [$body, [$wrap]] )
180           Inherited, see "Access to the body" in Mail::Message::Field
181
182   Access to the content
183       Extends "Access to the content" in Mail::Message::Field.
184
185       $obj->addresses()
186           Inherited, see "Access to the content" in Mail::Message::Field
187
188       $obj->attribute( $name, [$value] )
189           Inherited, see "Access to the content" in Mail::Message::Field
190
191       $obj->attributes()
192           Inherited, see "Access to the content" in Mail::Message::Field
193
194       $obj->comment( [STRING] )
195           Inherited, see "Access to the content" in Mail::Message::Field
196
197       $obj->study()
198           Inherited, see "Access to the content" in Mail::Message::Field
199
200       $obj->toDate( [$time] )
201       Mail::Message::Field::Fast->toDate( [$time] )
202           Inherited, see "Access to the content" in Mail::Message::Field
203
204       $obj->toInt()
205           Inherited, see "Access to the content" in Mail::Message::Field
206
207   Other methods
208       Extends "Other methods" in Mail::Message::Field.
209
210       $obj->dateToTimestamp(STRING)
211       Mail::Message::Field::Fast->dateToTimestamp(STRING)
212           Inherited, see "Other methods" in Mail::Message::Field
213
214   Internals
215       Extends "Internals" in Mail::Message::Field.
216
217       $obj->consume( $line | <$name,<$body|$objects>> )
218           Inherited, see "Internals" in Mail::Message::Field
219
220       $obj->defaultWrapLength( [$length] )
221           Inherited, see "Internals" in Mail::Message::Field
222
223       $obj->fold( $name, $body, [$maxchars] )
224       Mail::Message::Field::Fast->fold( $name, $body, [$maxchars] )
225           Inherited, see "Internals" in Mail::Message::Field
226
227       $obj->setWrapLength( [$length] )
228           Inherited, see "Internals" in Mail::Message::Field
229
230       $obj->stringifyData(STRING|ARRAY|$objects)
231           Inherited, see "Internals" in Mail::Message::Field
232
233       $obj->unfold(STRING)
234           Inherited, see "Internals" in Mail::Message::Field
235
236   Error handling
237       Extends "Error handling" in Mail::Message::Field.
238
239       $obj->AUTOLOAD()
240           Inherited, see "Error handling" in Mail::Reporter
241
242       $obj->addReport($object)
243           Inherited, see "Error handling" in Mail::Reporter
244
245       $obj->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level,
246       $callback] )
247       Mail::Message::Field::Fast->defaultTrace( [$level]|[$loglevel,
248       $tracelevel]|[$level, $callback] )
249           Inherited, see "Error handling" in Mail::Reporter
250
251       $obj->errors()
252           Inherited, see "Error handling" in Mail::Reporter
253
254       $obj->log( [$level, [$strings]] )
255       Mail::Message::Field::Fast->log( [$level, [$strings]] )
256           Inherited, see "Error handling" in Mail::Reporter
257
258       $obj->logPriority($level)
259       Mail::Message::Field::Fast->logPriority($level)
260           Inherited, see "Error handling" in Mail::Reporter
261
262       $obj->logSettings()
263           Inherited, see "Error handling" in Mail::Reporter
264
265       $obj->notImplemented()
266           Inherited, see "Error handling" in Mail::Reporter
267
268       $obj->report( [$level] )
269           Inherited, see "Error handling" in Mail::Reporter
270
271       $obj->reportAll( [$level] )
272           Inherited, see "Error handling" in Mail::Reporter
273
274       $obj->trace( [$level] )
275           Inherited, see "Error handling" in Mail::Reporter
276
277       $obj->warnings()
278           Inherited, see "Error handling" in Mail::Reporter
279
280   Cleanup
281       Extends "Cleanup" in Mail::Message::Field.
282
283       $obj->DESTROY()
284           Inherited, see "Cleanup" in Mail::Reporter
285

DETAILS

287       Extends "DETAILS" in Mail::Message::Field.
288

DIAGNOSTICS

290       Warning: Field content is not numerical: $content
291           The numeric value of a field is requested (for instance the "Lines"
292           or "Content-Length" fields should be numerical), however the data
293           contains weird characters.
294
295       Warning: Illegal character in field name $name
296           A new field is being created which does contain characters not
297           permitted by the RFCs.  Using this field in messages may break
298           other e-mail clients or transfer agents, and therefore mutulate or
299           extinguish your message.
300
301       Error: Package $package does not implement $method.
302           Fatal error: the specific package (or one of its superclasses) does
303           not implement this method where it should. This message means that
304           some other related classes do implement this method however the
305           class at hand does not.  Probably you should investigate this and
306           probably inform the author of the package.
307

SEE ALSO

309       This module is part of Mail-Message distribution version 3.012, built
310       on February 11, 2022. Website: http://perl.overmeer.net/CPAN/
311

LICENSE

313       Copyrights 2001-2022 by [Mark Overmeer <markov@cpan.org>]. For other
314       contributors see ChangeLog.
315
316       This program is free software; you can redistribute it and/or modify it
317       under the same terms as Perl itself.  See http://dev.perl.org/licenses/
318
319
320
321perl v5.36.0                      2023-01-20     Mail::Message::Field::Fast(3)
Impressum