1Mail::Message::Field::UURsIesr(3C)ontributed Perl DocumeMnatialt:i:oMnessage::Field::URIs(3)
2
3
4
6 Mail::Message::Field::URIs - message header field with uris
7
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
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
27 More recent RFCs prefer uri field notation over the various
28 differentiated syntaxes. Especially the mailing-list RFCs use these
29 fields all the time. This class can maintain these fields.
30
32 overload: ""
33 See "OVERLOADED" in Mail::Message::Field
34
35 overload: +0
36 See "OVERLOADED" in Mail::Message::Field
37
38 overload: <=>
39 See "OVERLOADED" in Mail::Message::Field
40
41 overload: bool
42 See "OVERLOADED" in Mail::Message::Field
43
44 overload: cmp
45 See "OVERLOADED" in Mail::Message::Field
46
47 overload: stringification
48 See "OVERLOADED" in Mail::Message::Field::Full
49
51 Constructors
52 $obj->clone
53 See "Constructors" in Mail::Message::Field
54
55 Mail::Message::Field::URIs->from(FIELD, OPTIONS)
56 See "Constructors" in Mail::Message::Field::Full
57
58 Mail::Message::Field::URIs->new(DATA)
59 -Option --Defined in --Default
60 attributes Mail::Message::Field::Structured <ignored>
61 charset Mail::Message::Field::Full undef
62 datum Mail::Message::Field::Structured undef
63 encoding Mail::Message::Field::Full 'q'
64 force Mail::Message::Field::Full false
65 language Mail::Message::Field::Full undef
66 log Mail::Reporter 'WARNINGS'
67 trace Mail::Reporter 'WARNINGS'
68
69 attributes => ATTRS
70 charset => STRING
71 datum => STRING
72 encoding => 'q'|'Q'|'b'|'B'
73 force => BOOLEAN
74 language => STRING
75 log => LEVEL
76 trace => LEVEL
77
78 example:
79
80 my $mmfu = 'Mail::Message::Field::URIs;
81 my $f = $mmfu->new('List-Post' => 'mailto:x@y.com');
82 my $f = $mmfu->new('List-Post' => '<mailto:x@y.com>');
83 my $f = $mmfu->new('List-Post: <mailto:x@y.com>');
84 my $f = $mmfu->new('List-Post' => [ $uri, 'http://x.org' ]);
85
86 The field
87 $obj->isStructured
88 Mail::Message::Field::URIs->isStructured
89
90 See "The field" in Mail::Message::Field
91
92 $obj->length
93 See "The field" in Mail::Message::Field
94
95 $obj->nrLines
96 See "The field" in Mail::Message::Field
97
98 $obj->print([FILEHANDLE])
99 See "The field" in Mail::Message::Field
100
101 $obj->size
102 See "The field" in Mail::Message::Field
103
104 $obj->string([WRAP])
105 See "The field" in Mail::Message::Field
106
107 $obj->toDisclose
108 See "The field" in Mail::Message::Field
109
110 Access to the name
111 $obj->Name
112 See "Access to the name" in Mail::Message::Field
113
114 $obj->name
115 See "Access to the name" in Mail::Message::Field
116
117 $obj->wellformedName([STRING])
118 See "Access to the name" in Mail::Message::Field
119
120 Access to the body
121 $obj->body
122 See "Access to the body" in Mail::Message::Field
123
124 $obj->decodedBody(OPTIONS)
125 See "Access to the body" in Mail::Message::Field::Full
126
127 $obj->folded
128 See "Access to the body" in Mail::Message::Field
129
130 $obj->foldedBody([BODY])
131 See "Access to the body" in Mail::Message::Field
132
133 $obj->stripCFWS([STRING])
134 Mail::Message::Field::URIs->stripCFWS([STRING])
135
136 See "Access to the body" in Mail::Message::Field
137
138 $obj->unfoldedBody([BODY, [WRAP]])
139 See "Access to the body" in Mail::Message::Field
140
141 Access to the content
142 $obj->URIs
143 Returns a list with all URIs defined by the field. Mind the lower-
144 case 's' at the enc of the name.
145
146 example:
147
148 my @uris = $field->URIs;
149
150 $obj->addAttribute(...)
151 Attributes are not supported for URI fields.
152
153 $obj->addURI(URI)
154 Add an URI to the field. The URI can be specified as URI object or
155 as string which will be turned into an URI object. The added URI
156 is returned.
157
158 example: adding an URI to an URI field
159
160 my $f = Mail::Message::Field::URI->new('List-Post');
161
162 my $uri = URI->new("http://x.org");
163 $f->addURI($uri);
164
165 $f->addURI("http://y.org"); # simpler
166 $f->addURI("//y.org", "http");
167
168 $obj->addresses
169 See "Access to the content" in Mail::Message::Field
170
171 $obj->attribute(OBJECT|(STRING, OPTIONS)|(NAME,VALUE,OPTIONS))
172 See "Access to the content" in Mail::Message::Field::Structured
173
174 $obj->attributes
175 See "Access to the content" in Mail::Message::Field::Structured
176
177 $obj->beautify
178 See "Access to the content" in Mail::Message::Field::Full
179
180 $obj->comment([STRING])
181 See "Access to the content" in Mail::Message::Field
182
183 $obj->createComment(STRING, OPTIONS)
184 Mail::Message::Field::URIs->createComment(STRING, OPTIONS)
185
186 See "Access to the content" in Mail::Message::Field::Full
187
188 $obj->createPhrase(STRING, OPTIONS)
189 Mail::Message::Field::URIs->createPhrase(STRING, OPTIONS)
190
191 See "Access to the content" in Mail::Message::Field::Full
192
193 $obj->study
194 See "Access to the content" in Mail::Message::Field
195
196 $obj->toDate([TIME])
197 Mail::Message::Field::URIs->toDate([TIME])
198
199 See "Access to the content" in Mail::Message::Field
200
201 $obj->toInt
202 See "Access to the content" in Mail::Message::Field
203
204 Other methods
205 $obj->dateToTimestamp(STRING)
206 Mail::Message::Field::URIs->dateToTimestamp(STRING)
207
208 See "Other methods" in Mail::Message::Field
209
210 Internals
211 $obj->consume(LINE | (NAME,BODY|OBJECTS))
212 See "Internals" in Mail::Message::Field
213
214 $obj->decode(STRING, OPTIONS)
215 Mail::Message::Field::URIs->decode(STRING, OPTIONS)
216
217 See "Internals" in Mail::Message::Field::Full
218
219 $obj->defaultWrapLength([LENGTH])
220 See "Internals" in Mail::Message::Field
221
222 $obj->encode(STRING, OPTIONS)
223 See "Internals" in Mail::Message::Field::Full
224
225 $obj->fold(NAME, BODY, [MAXCHARS])
226 Mail::Message::Field::URIs->fold(NAME, BODY, [MAXCHARS])
227
228 See "Internals" in Mail::Message::Field
229
230 $obj->setWrapLength([LENGTH])
231 See "Internals" in Mail::Message::Field
232
233 $obj->stringifyData(STRING|ARRAY|OBJECTS)
234 See "Internals" in Mail::Message::Field
235
236 $obj->unfold(STRING)
237 See "Internals" in Mail::Message::Field
238
239 Parsing
240 $obj->consumeComment(STRING)
241 Mail::Message::Field::URIs->consumeComment(STRING)
242
243 See "Parsing" in Mail::Message::Field::Full
244
245 $obj->consumeDotAtom(STRING)
246 See "Parsing" in Mail::Message::Field::Full
247
248 $obj->consumePhrase(STRING)
249 Mail::Message::Field::URIs->consumePhrase(STRING)
250
251 See "Parsing" in Mail::Message::Field::Full
252
253 $obj->datum([VALUE])
254 See "Parsing" in Mail::Message::Field::Structured
255
256 $obj->parse(STRING)
257 See "Parsing" in Mail::Message::Field::Full
258
259 $obj->produceBody
260 See "Parsing" in Mail::Message::Field::Full
261
262 Error handling
263 $obj->AUTOLOAD
264 See "Error handling" in Mail::Reporter
265
266 $obj->addReport(OBJECT)
267 See "Error handling" in Mail::Reporter
268
269 $obj->defaultTrace([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
270 Mail::Message::Field::URIs->defaultTrace([LEVEL]|[LOGLEVEL,
271 TRACELEVEL]|[LEVEL, CALLBACK])
272
273 See "Error handling" in Mail::Reporter
274
275 $obj->errors
276 See "Error handling" in Mail::Reporter
277
278 $obj->log([LEVEL [,STRINGS]])
279 Mail::Message::Field::URIs->log([LEVEL [,STRINGS]])
280
281 See "Error handling" in Mail::Reporter
282
283 $obj->logPriority(LEVEL)
284 Mail::Message::Field::URIs->logPriority(LEVEL)
285
286 See "Error handling" in Mail::Reporter
287
288 $obj->logSettings
289 See "Error handling" in Mail::Reporter
290
291 $obj->notImplemented
292 See "Error handling" in Mail::Reporter
293
294 $obj->report([LEVEL])
295 See "Error handling" in Mail::Reporter
296
297 $obj->reportAll([LEVEL])
298 See "Error handling" in Mail::Reporter
299
300 $obj->trace([LEVEL])
301 See "Error handling" in Mail::Reporter
302
303 $obj->warnings
304 See "Error handling" in Mail::Reporter
305
306 Cleanup
307 $obj->DESTROY
308 See "Cleanup" in Mail::Reporter
309
310 $obj->inGlobalDestruction
311 See "Cleanup" in Mail::Reporter
312
314 Warning: Field content is not numerical: $content
315 The numeric value of a field is requested (for instance the "Lines"
316 or "Content-Length" fields should be numerical), however the data
317 contains weird characters.
318
319 Warning: Illegal character in charset '$charset'
320 The field is created with an utf8 string which only contains data
321 from the specified character set. However, that character set can
322 never be a valid name because it contains characters which are not
323 permitted.
324
325 Warning: Illegal character in field name $name
326 A new field is being created which does contain characters not
327 permitted by the RFCs. Using this field in messages may break
328 other e-mail clients or transfer agents, and therefore mutulate or
329 extinguish your message.
330
331 Warning: Illegal character in language '$lang'
332 The field is created with data which is specified to be in a
333 certain language, however, the name of the language cannot be
334 valid: it contains characters which are not permitted by the RFCs.
335
336 Warning: Illegal encoding '$encoding', used 'q'
337 The RFCs only permit base64 ("b " or "B ") or quoted-printable ("q"
338 or "Q") encoding. Other than these four options are illegal.
339
340 Error: No attributes for URI fields.
341 Is is not possible to add attributes to URI fields: it is not
342 permitted by the RFCs.
343
344 Error: Package $package does not implement $method.
345 Fatal error: the specific package (or one of its superclasses) does
346 not implement this method where it should. This message means that
347 some other related classes do implement this method however the
348 class at hand does not. Probably you should investigate this and
349 probably inform the author of the package.
350
352 This module is part of Mail-Box distribution version 2.097, built on
353 January 26, 2011. Website: http://perl.overmeer.net/mailbox/
354
356 Copyrights 2001-2011 by Mark Overmeer. For other contributors see
357 ChangeLog.
358
359 This program is free software; you can redistribute it and/or modify it
360 under the same terms as Perl itself. See
361 http://www.perl.com/perl/misc/Artistic.html
362
363
364
365perl v5.12.3 2011-01-26 Mail::Message::Field::URIs(3)