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           See "OVERLOADED" in Mail::Message::Field
26
27       overload: +0
28           See "OVERLOADED" in Mail::Message::Field
29
30       overload: <=>
31           See "OVERLOADED" in Mail::Message::Field
32
33       overload: bool
34           See "OVERLOADED" in Mail::Message::Field
35
36       overload: cmp
37           See "OVERLOADED" in Mail::Message::Field
38
39       overload: stringification
40           See "OVERLOADED" in Mail::Message::Field::Full
41

METHODS

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

DIAGNOSTICS

289       Warning: Field content is not numerical: $content
290           The numeric value of a field is requested (for instance the "Lines"
291           or "Content-Length" fields should be numerical), however the data
292           contains weird characters.
293
294       Warning: Illegal character in charset '$charset'
295           The field is created with an utf8 string which only contains data
296           from the specified character set.  However, that character set can
297           never be a valid name because it contains characters which are not
298           permitted.
299
300       Warning: Illegal character in field name $name
301           A new field is being created which does contain characters not
302           permitted by the RFCs.  Using this field in messages may break
303           other e-mail clients or transfer agents, and therefore mutulate or
304           extinguish your message.
305
306       Warning: Illegal character in language '$lang'
307           The field is created with data which is specified to be in a
308           certain language, however, the name of the language cannot be
309           valid: it contains characters which are not permitted by the RFCs.
310
311       Warning: Illegal encoding '$encoding', used 'q'
312           The RFCs only permit base64 ("b " or "B ") or quoted-printable ("q"
313           or "Q") encoding.  Other than these four options are illegal.
314
315       Error: Package $package does not implement $method.
316           Fatal error: the specific package (or one of its superclasses) does
317           not implement this method where it should. This message means that
318           some other related classes do implement this method however the
319           class at hand does not.  Probably you should investigate this and
320           probably inform the author of the package.
321

SEE ALSO

323       This module is part of Mail-Box distribution version 2.097, built on
324       January 26, 2011. Website: http://perl.overmeer.net/mailbox/
325

LICENSE

327       Copyrights 2001-2011 by Mark Overmeer. For other contributors see
328       ChangeLog.
329
330       This program is free software; you can redistribute it and/or modify it
331       under the same terms as Perl itself.  See
332       http://www.perl.com/perl/misc/Artistic.html
333
334
335
336perl v5.12.3                      2011-01-M2a6il::Message::Field::Unstructured(3)
Impressum