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