1Mail::Message::Field::UUnssetrruCcotnutrreidb(u3t)ed PerMlaiDlo:c:uMmeesnstaagtei:o:nField::Unstructured(3)
2
3
4

NAME

6       Mail::Message::Field::Unstructured - smart unstructured field
7

INHERITANCE

9        Mail::Message::Field::Unstructured
10          is a Mail::Message::Field::Full
11          is a Mail::Message::Field
12          is a Mail::Reporter
13

SYNOPSIS

15        my $f = Mail::Message::Field::Unstructured->new(Comments => 'hi!');
16

DESCRIPTION

18       Unstructured fields do contain information which is not restricted in
19       any way.  RFC2822 defines some unstructured fields, but by default all
20       unknown fields are unstructured as well.  Things like attributes and
21       comments have no meaning for unstructured fields, but encoding does.
22

OVERLOADED

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

METHODS

49       Constructors
50
51       $obj->clone
52
53           See "Constructors" in Mail::Message::Field
54
55       Mail::Message::Field::Unstructured->from(FIELD, OPTIONS)
56
57           See "Constructors" in Mail::Message::Field::Full
58
59       Mail::Message::Field::Unstructured->new(DATA)
60
61           When the DATA is specified as single line, the content part is con‐
62           sidered to be correcly (character) encoded and escaped.  Typically,
63           it is a line as read from file.  The folding of the line is kept as
64           is.
65
66           In case more than one argument is provided, the second is consid‐
67           ered the BODY.  Attributes and other special things are not defined
68           for unstructured fields, and therefore not valid options.  The BODY
69           can be a single string, a single OBJECT, or an array of OBJECTS.
70           The objects are stringified (into a comma separated list).  Each
71           BODY element is interpreted with the specified encoding.
72
73           When the BODY is empty, the construction of the object fails:
74           "undef" is returned.
75
76            Option  --Defined in     --Default
77            charset   Mail::Message::Field::Full  undef
78            encoding  Mail::Message::Field::Full  'q'
79            force     Mail::Message::Field::Full  false
80            language  Mail::Message::Field::Full  undef
81            log       Mail::Reporter   'WARNINGS'
82            trace     Mail::Reporter   'WARNINGS'
83
84           . charset STRING
85
86           . encoding 'q'⎪'Q'⎪'b'⎪'B'
87
88           . force BOOLEAN
89
90           . language STRING
91
92           . log LEVEL
93
94           . trace LEVEL
95
96           Example:
97
98            my $s = Mail::Message::Field::Unstructured->new('Comment', 'Hi!');
99
100            # Use autodetect
101            my $s = Mail::Message::Field::Full->new('Comment', 'Hi!');
102            my $s = Mail::Message::Field::Full->new('Comment: Hi!');
103
104       The field
105
106       $obj->isStructured
107
108       Mail::Message::Field::Unstructured->isStructured
109
110           See "The field" in Mail::Message::Field
111
112       $obj->length
113
114           See "The field" in Mail::Message::Field
115
116       $obj->nrLines
117
118           See "The field" in Mail::Message::Field
119
120       $obj->print([FILEHANDLE])
121
122           See "The field" in Mail::Message::Field
123
124       $obj->size
125
126           See "The field" in Mail::Message::Field
127
128       $obj->string([WRAP])
129
130           See "The field" in Mail::Message::Field
131
132       $obj->toDisclose
133
134           See "The field" in Mail::Message::Field
135
136       Access to the name
137
138       $obj->Name
139
140           See "Access to the name" in Mail::Message::Field
141
142       $obj->name
143
144           See "Access to the name" in Mail::Message::Field
145
146       $obj->wellformedName([STRING])
147
148           See "Access to the name" in Mail::Message::Field
149
150       Access to the body
151
152       $obj->body
153
154           See "Access to the body" in Mail::Message::Field
155
156       $obj->decodedBody(OPTIONS)
157
158           See "Access to the body" in Mail::Message::Field::Full
159
160       $obj->folded
161
162           See "Access to the body" in Mail::Message::Field
163
164       $obj->foldedBody([BODY])
165
166           See "Access to the body" in Mail::Message::Field
167
168       $obj->stripCFWS([STRING])
169
170       Mail::Message::Field::Unstructured->stripCFWS([STRING])
171
172           See "Access to the body" in Mail::Message::Field
173
174       $obj->unfoldedBody([BODY, [WRAP]])
175
176           See "Access to the body" in Mail::Message::Field
177
178       Access to the content
179
180       $obj->addresses
181
182           See "Access to the content" in Mail::Message::Field
183
184       $obj->attribute(NAME [, VALUE])
185
186           See "Access to the content" in Mail::Message::Field
187
188       $obj->attributes
189
190           See "Access to the content" in Mail::Message::Field
191
192       $obj->beautify
193
194           See "Access to the content" in Mail::Message::Field::Full
195
196       $obj->comment([STRING])
197
198           See "Access to the content" in Mail::Message::Field
199
200       $obj->createComment(STRING, OPTIONS)
201
202       Mail::Message::Field::Unstructured->createComment(STRING, OPTIONS)
203
204           See "Access to the content" in Mail::Message::Field::Full
205
206       $obj->createPhrase(STRING, OPTIONS)
207
208       Mail::Message::Field::Unstructured->createPhrase(STRING, OPTIONS)
209
210           See "Access to the content" in Mail::Message::Field::Full
211
212       $obj->study
213
214           See "Access to the content" in Mail::Message::Field
215
216       $obj->toDate([TIME])
217
218       Mail::Message::Field::Unstructured->toDate([TIME])
219
220           See "Access to the content" in Mail::Message::Field
221
222       $obj->toInt
223
224           See "Access to the content" in Mail::Message::Field
225
226       Other methods
227
228       $obj->dateToTimestamp(STRING)
229
230       Mail::Message::Field::Unstructured->dateToTimestamp(STRING)
231
232           See "Other methods" in Mail::Message::Field
233
234       Internals
235
236       $obj->consume(LINE ⎪ (NAME,BODY⎪OBJECTS))
237
238           See "Internals" in Mail::Message::Field
239
240       $obj->decode(STRING, OPTIONS)
241
242       Mail::Message::Field::Unstructured->decode(STRING, OPTIONS)
243
244           See "Internals" in Mail::Message::Field::Full
245
246       $obj->defaultWrapLength([LENGTH])
247
248           See "Internals" in Mail::Message::Field
249
250       $obj->encode(STRING, OPTIONS)
251
252           See "Internals" in Mail::Message::Field::Full
253
254       $obj->fold(NAME, BODY, [MAXCHARS])
255
256       Mail::Message::Field::Unstructured->fold(NAME, BODY, [MAXCHARS])
257
258           See "Internals" in Mail::Message::Field
259
260       $obj->setWrapLength([LENGTH])
261
262           See "Internals" in Mail::Message::Field
263
264       $obj->stringifyData(STRING⎪ARRAY⎪OBJECTS)
265
266           See "Internals" in Mail::Message::Field
267
268       $obj->unfold(STRING)
269
270           See "Internals" in Mail::Message::Field
271
272       Parsing
273
274       $obj->consumeComment(STRING)
275
276       Mail::Message::Field::Unstructured->consumeComment(STRING)
277
278           See "Parsing" in Mail::Message::Field::Full
279
280       $obj->consumeDotAtom(STRING)
281
282           See "Parsing" in Mail::Message::Field::Full
283
284       $obj->consumePhrase(STRING)
285
286       Mail::Message::Field::Unstructured->consumePhrase(STRING)
287
288           See "Parsing" in Mail::Message::Field::Full
289
290       $obj->parse(STRING)
291
292           See "Parsing" in Mail::Message::Field::Full
293
294       $obj->produceBody
295
296           See "Parsing" in Mail::Message::Field::Full
297
298       Error handling
299
300       $obj->AUTOLOAD
301
302           See "Error handling" in Mail::Reporter
303
304       $obj->addReport(OBJECT)
305
306           See "Error handling" in Mail::Reporter
307
308       $obj->defaultTrace([LEVEL]⎪[LOGLEVEL, TRACELEVEL]⎪[LEVEL, CALLBACK])
309
310       Mail::Message::Field::Unstructured->defaultTrace([LEVEL]⎪[LOGLEVEL,
311       TRACELEVEL]⎪[LEVEL, CALLBACK])
312
313           See "Error handling" in Mail::Reporter
314
315       $obj->errors
316
317           See "Error handling" in Mail::Reporter
318
319       $obj->log([LEVEL [,STRINGS]])
320
321       Mail::Message::Field::Unstructured->log([LEVEL [,STRINGS]])
322
323           See "Error handling" in Mail::Reporter
324
325       $obj->logPriority(LEVEL)
326
327       Mail::Message::Field::Unstructured->logPriority(LEVEL)
328
329           See "Error handling" in Mail::Reporter
330
331       $obj->logSettings
332
333           See "Error handling" in Mail::Reporter
334
335       $obj->notImplemented
336
337           See "Error handling" in Mail::Reporter
338
339       $obj->report([LEVEL])
340
341           See "Error handling" in Mail::Reporter
342
343       $obj->reportAll([LEVEL])
344
345           See "Error handling" in Mail::Reporter
346
347       $obj->trace([LEVEL])
348
349           See "Error handling" in Mail::Reporter
350
351       $obj->warnings
352
353           See "Error handling" in Mail::Reporter
354
355       Cleanup
356
357       $obj->DESTROY
358
359           See "Cleanup" in Mail::Reporter
360
361       $obj->inGlobalDestruction
362
363           See "Cleanup" in Mail::Reporter
364

DETAILS

DIAGNOSTICS

367       Warning: Field content is not numerical: $content
368
369       The numeric value of a field is requested (for instance the "Lines" or
370       "Content-Length" fields should be numerical), however the data contains
371       weird characters.
372
373       Warning: Illegal character in charset '$charset'
374
375       The field is created with an utf8 string which only contains data from
376       the specified character set.  However, that character set can never be
377       a valid name because it contains characters which are not permitted.
378
379       Warning: Illegal character in field name $name
380
381       A new field is being created which does contain characters not permit‐
382       ted by the RFCs.  Using this field in messages may break other e-mail
383       clients or transfer agents, and therefore mutulate or extinguish your
384       message.
385
386       Warning: Illegal character in language '$lang'
387
388       The field is created with data which is specified to be in a certain
389       language, however, the name of the language cannot be valid: it con‐
390       tains characters which are not permitted by the RFCs.
391
392       Warning: Illegal encoding '$encoding', used 'q'
393
394       The RFCs only permit base64 ("b " or "B ") or quoted-printable ("q" or
395       "Q") encoding.  Other than these four options are illegal.
396
397       Error: Package $package does not implement $method.
398
399       Fatal error: the specific package (or one of its superclasses) does not
400       implement this method where it should. This message means that some
401       other related classes do implement this method however the class at
402       hand does not.  Probably you should investigate this and probably
403       inform the author of the package.
404

SEE ALSO

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

LICENSE

410       Copyrights 2001-2007 by Mark Overmeer.For other contributors see
411       ChangeLog.
412
413       This program is free software; you can redistribute it and/or modify it
414       under the same terms as Perl itself.  See
415       http://www.perl.com/perl/misc/Artistic.html
416
417
418
419perl v5.8.8                       2007-03-M2a5il::Message::Field::Unstructured(3)
Impressum