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

OVERLOADED

23       overload: ""
24
25           See "OVERLOADED" in Mail::Message::Field
26
27       overload: +0
28
29           See "OVERLOADED" in Mail::Message::Field
30
31       overload: <=>
32
33           See "OVERLOADED" in Mail::Message::Field
34
35       overload: bool
36
37           See "OVERLOADED" in Mail::Message::Field
38
39       overload: cmp
40
41           See "OVERLOADED" in Mail::Message::Field
42

METHODS

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

DETAILS

DIAGNOSTICS

332       Warning: Field content is not numerical: $content
333
334       The numeric value of a field is requested (for instance the "Lines" or
335       "Content-Length" fields should be numerical), however the data contains
336       weird characters.
337
338       Warning: Illegal character in field name $name
339
340       A new field is being created which does contain characters not permit‐
341       ted by the RFCs.  Using this field in messages may break other e-mail
342       clients or transfer agents, and therefore mutulate or extinguish your
343       message.
344
345       Error: Package $package does not implement $method.
346
347       Fatal error: the specific package (or one of its superclasses) does not
348       implement this method where it should. This message means that some
349       other related classes do implement this method however the class at
350       hand does not.  Probably you should investigate this and probably
351       inform the author of the package.
352

SEE ALSO

354       This module is part of Mail-Box distribution version 2.070, built on
355       March 25, 2007. Website: http://perl.overmeer.net/mailbox/
356

LICENSE

358       Copyrights 2001-2007 by Mark Overmeer.For other contributors see
359       ChangeLog.
360
361       This program is free software; you can redistribute it and/or modify it
362       under the same terms as Perl itself.  See
363       http://www.perl.com/perl/misc/Artistic.html
364
365
366
367perl v5.8.8                       2007-03-25     Mail::Message::Field::Fast(3)
Impressum