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

NAME

6       Mail::Message::Field::URIs - message header field with uris
7

INHERITANCE

9        Mail::Message::Field::URIs
10          is a Mail::Message::Field::Structured
11          is a Mail::Message::Field::Full
12          is a Mail::Message::Field
13          is a Mail::Reporter
14

SYNOPSIS

16        my $f = Mail::Message::Field->new('List-Post' => 'http://x.org/');
17
18        my $g = Mail::Message::Field->new('List-Post');
19        $g->addURI('http://x.org');
20
21        my $uri = URI->new(...);
22        $g->addURI($uri);
23
24        my @uris = $g->URIs;
25

DESCRIPTION

27       More recent RFCs prefer uri field notation over the various differenti‐
28       ated syntaxes.  Especially the mailing-list RFCs use these fields all
29       the time.  This class can maintain these fields.
30

OVERLOADED

32       overload: ""
33
34           See "OVERLOADED" in Mail::Message::Field
35
36       overload: +0
37
38           See "OVERLOADED" in Mail::Message::Field
39
40       overload: <=>
41
42           See "OVERLOADED" in Mail::Message::Field
43
44       overload: bool
45
46           See "OVERLOADED" in Mail::Message::Field
47
48       overload: cmp
49
50           See "OVERLOADED" in Mail::Message::Field
51
52       overload: stringification
53
54           See "OVERLOADED" in Mail::Message::Field::Full
55

METHODS

57       Constructors
58
59       $obj->clone
60
61           See "Constructors" in Mail::Message::Field
62
63       Mail::Message::Field::URIs->from(FIELD, OPTIONS)
64
65           See "Constructors" in Mail::Message::Field::Full
66
67       Mail::Message::Field::URIs->new(DATA)
68
69        Option    --Defined in     --Default
70        attributes  Mail::Message::Field::Structured  <ignored>
71        charset     Mail::Message::Field::Full  undef
72        datum       Mail::Message::Field::Structured  undef
73        encoding    Mail::Message::Field::Full  'q'
74        force       Mail::Message::Field::Full  false
75        language    Mail::Message::Field::Full  undef
76        log         Mail::Reporter   'WARNINGS'
77        trace       Mail::Reporter   'WARNINGS'
78
79           . attributes ATTRS
80
81           . charset STRING
82
83           . datum STRING
84
85           . encoding 'q'⎪'Q'⎪'b'⎪'B'
86
87           . force BOOLEAN
88
89           . language STRING
90
91           . log LEVEL
92
93           . trace LEVEL
94
95           Example:
96
97            my $mmfu = 'Mail::Message::Field::URIs;
98            my $f = $mmfu->new('List-Post' => 'mailto:x@y.com');
99            my $f = $mmfu->new('List-Post' => '<mailto:x@y.com>');
100            my $f = $mmfu->new('List-Post: <mailto:x@y.com>');
101            my $f = $mmfu->new('List-Post' => [ $uri, 'http://x.org' ]);
102
103       The field
104
105       $obj->isStructured
106
107       Mail::Message::Field::URIs->isStructured
108
109           See "The field" in Mail::Message::Field
110
111       $obj->length
112
113           See "The field" in Mail::Message::Field
114
115       $obj->nrLines
116
117           See "The field" in Mail::Message::Field
118
119       $obj->print([FILEHANDLE])
120
121           See "The field" in Mail::Message::Field
122
123       $obj->size
124
125           See "The field" in Mail::Message::Field
126
127       $obj->string([WRAP])
128
129           See "The field" in Mail::Message::Field
130
131       $obj->toDisclose
132
133           See "The field" in Mail::Message::Field
134
135       Access to the name
136
137       $obj->Name
138
139           See "Access to the name" in Mail::Message::Field
140
141       $obj->name
142
143           See "Access to the name" in Mail::Message::Field
144
145       $obj->wellformedName([STRING])
146
147           See "Access to the name" in Mail::Message::Field
148
149       Access to the body
150
151       $obj->body
152
153           See "Access to the body" in Mail::Message::Field
154
155       $obj->decodedBody(OPTIONS)
156
157           See "Access to the body" in Mail::Message::Field::Full
158
159       $obj->folded
160
161           See "Access to the body" in Mail::Message::Field
162
163       $obj->foldedBody([BODY])
164
165           See "Access to the body" in Mail::Message::Field
166
167       $obj->stripCFWS([STRING])
168
169       Mail::Message::Field::URIs->stripCFWS([STRING])
170
171           See "Access to the body" in Mail::Message::Field
172
173       $obj->unfoldedBody([BODY, [WRAP]])
174
175           See "Access to the body" in Mail::Message::Field
176
177       Access to the content
178
179       $obj->URIs
180
181           Returns a list with all URIs defined by the field.  Mind the lower-
182           case 's' at the enc of the name.
183
184           Example:
185
186            my @uris = $field->URIs;
187
188       $obj->addAttribute(...)
189
190           Attributes are not supported for URI fields.
191
192       $obj->addURI(URI)
193
194           Add an URI to the field.  The URI can be specified as URI object or
195           as string which will be turned into an URI object.  The added URI
196           is returned.
197
198           Example: adding an URI to an URI field
199
200            my $f   = Mail::Message::Field::URI->new('List-Post');
201
202            my $uri = URI->new("http://x.org");
203            $f->addURI($uri);
204
205            $f->addURI("http://y.org");  # simpler
206            $f->addURI("//y.org", "http");
207
208       $obj->addresses
209
210           See "Access to the content" in Mail::Message::Field
211
212       $obj->attribute(OBJECT⎪(STRING, OPTIONS)⎪(NAME,VALUE,OPTIONS))
213
214           See "Access to the content" in Mail::Message::Field::Structured
215
216       $obj->attributes
217
218           See "Access to the content" in Mail::Message::Field::Structured
219
220       $obj->beautify
221
222           See "Access to the content" in Mail::Message::Field::Full
223
224       $obj->comment([STRING])
225
226           See "Access to the content" in Mail::Message::Field
227
228       $obj->createComment(STRING, OPTIONS)
229
230       Mail::Message::Field::URIs->createComment(STRING, OPTIONS)
231
232           See "Access to the content" in Mail::Message::Field::Full
233
234       $obj->createPhrase(STRING, OPTIONS)
235
236       Mail::Message::Field::URIs->createPhrase(STRING, OPTIONS)
237
238           See "Access to the content" in Mail::Message::Field::Full
239
240       $obj->study
241
242           See "Access to the content" in Mail::Message::Field
243
244       $obj->toDate([TIME])
245
246       Mail::Message::Field::URIs->toDate([TIME])
247
248           See "Access to the content" in Mail::Message::Field
249
250       $obj->toInt
251
252           See "Access to the content" in Mail::Message::Field
253
254       Other methods
255
256       $obj->dateToTimestamp(STRING)
257
258       Mail::Message::Field::URIs->dateToTimestamp(STRING)
259
260           See "Other methods" in Mail::Message::Field
261
262       Internals
263
264       $obj->consume(LINE ⎪ (NAME,BODY⎪OBJECTS))
265
266           See "Internals" in Mail::Message::Field
267
268       $obj->decode(STRING, OPTIONS)
269
270       Mail::Message::Field::URIs->decode(STRING, OPTIONS)
271
272           See "Internals" in Mail::Message::Field::Full
273
274       $obj->defaultWrapLength([LENGTH])
275
276           See "Internals" in Mail::Message::Field
277
278       $obj->encode(STRING, OPTIONS)
279
280           See "Internals" in Mail::Message::Field::Full
281
282       $obj->fold(NAME, BODY, [MAXCHARS])
283
284       Mail::Message::Field::URIs->fold(NAME, BODY, [MAXCHARS])
285
286           See "Internals" in Mail::Message::Field
287
288       $obj->setWrapLength([LENGTH])
289
290           See "Internals" in Mail::Message::Field
291
292       $obj->stringifyData(STRING⎪ARRAY⎪OBJECTS)
293
294           See "Internals" in Mail::Message::Field
295
296       $obj->unfold(STRING)
297
298           See "Internals" in Mail::Message::Field
299
300       Parsing
301
302       $obj->consumeComment(STRING)
303
304       Mail::Message::Field::URIs->consumeComment(STRING)
305
306           See "Parsing" in Mail::Message::Field::Full
307
308       $obj->consumeDotAtom(STRING)
309
310           See "Parsing" in Mail::Message::Field::Full
311
312       $obj->consumePhrase(STRING)
313
314       Mail::Message::Field::URIs->consumePhrase(STRING)
315
316           See "Parsing" in Mail::Message::Field::Full
317
318       $obj->datum([VALUE])
319
320           See "Parsing" in Mail::Message::Field::Structured
321
322       $obj->parse(STRING)
323
324           See "Parsing" in Mail::Message::Field::Full
325
326       $obj->produceBody
327
328           See "Parsing" in Mail::Message::Field::Full
329
330       Error handling
331
332       $obj->AUTOLOAD
333
334           See "Error handling" in Mail::Reporter
335
336       $obj->addReport(OBJECT)
337
338           See "Error handling" in Mail::Reporter
339
340       $obj->defaultTrace([LEVEL]⎪[LOGLEVEL, TRACELEVEL]⎪[LEVEL, CALLBACK])
341
342       Mail::Message::Field::URIs->defaultTrace([LEVEL]⎪[LOGLEVEL,
343       TRACELEVEL]⎪[LEVEL, CALLBACK])
344
345           See "Error handling" in Mail::Reporter
346
347       $obj->errors
348
349           See "Error handling" in Mail::Reporter
350
351       $obj->log([LEVEL [,STRINGS]])
352
353       Mail::Message::Field::URIs->log([LEVEL [,STRINGS]])
354
355           See "Error handling" in Mail::Reporter
356
357       $obj->logPriority(LEVEL)
358
359       Mail::Message::Field::URIs->logPriority(LEVEL)
360
361           See "Error handling" in Mail::Reporter
362
363       $obj->logSettings
364
365           See "Error handling" in Mail::Reporter
366
367       $obj->notImplemented
368
369           See "Error handling" in Mail::Reporter
370
371       $obj->report([LEVEL])
372
373           See "Error handling" in Mail::Reporter
374
375       $obj->reportAll([LEVEL])
376
377           See "Error handling" in Mail::Reporter
378
379       $obj->trace([LEVEL])
380
381           See "Error handling" in Mail::Reporter
382
383       $obj->warnings
384
385           See "Error handling" in Mail::Reporter
386
387       Cleanup
388
389       $obj->DESTROY
390
391           See "Cleanup" in Mail::Reporter
392
393       $obj->inGlobalDestruction
394
395           See "Cleanup" in Mail::Reporter
396

DETAILS

DIAGNOSTICS

399       Warning: Field content is not numerical: $content
400
401       The numeric value of a field is requested (for instance the "Lines" or
402       "Content-Length" fields should be numerical), however the data contains
403       weird characters.
404
405       Warning: Illegal character in charset '$charset'
406
407       The field is created with an utf8 string which only contains data from
408       the specified character set.  However, that character set can never be
409       a valid name because it contains characters which are not permitted.
410
411       Warning: Illegal character in field name $name
412
413       A new field is being created which does contain characters not permit‐
414       ted by the RFCs.  Using this field in messages may break other e-mail
415       clients or transfer agents, and therefore mutulate or extinguish your
416       message.
417
418       Warning: Illegal character in language '$lang'
419
420       The field is created with data which is specified to be in a certain
421       language, however, the name of the language cannot be valid: it con‐
422       tains characters which are not permitted by the RFCs.
423
424       Warning: Illegal encoding '$encoding', used 'q'
425
426       The RFCs only permit base64 ("b " or "B ") or quoted-printable ("q" or
427       "Q") encoding.  Other than these four options are illegal.
428
429       Error: No attributes for URI fields.
430
431       Is is not possible to add attributes to URI fields: it is not permitted
432       by the RFCs.
433
434       Error: Package $package does not implement $method.
435
436       Fatal error: the specific package (or one of its superclasses) does not
437       implement this method where it should. This message means that some
438       other related classes do implement this method however the class at
439       hand does not.  Probably you should investigate this and probably
440       inform the author of the package.
441

SEE ALSO

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

LICENSE

447       Copyrights 2001-2007 by Mark Overmeer.For other contributors see
448       ChangeLog.
449
450       This program is free software; you can redistribute it and/or modify it
451       under the same terms as Perl itself.  See
452       http://www.perl.com/perl/misc/Artistic.html
453
454
455
456perl v5.8.8                       2007-03-25     Mail::Message::Field::URIs(3)
Impressum