| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package URI::cid; |
|
2
|
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
1126
|
use 5.008; |
|
|
3
|
|
|
|
|
9
|
|
|
|
3
|
|
|
|
|
121
|
|
|
4
|
3
|
|
|
3
|
|
16
|
use strict; |
|
|
3
|
|
|
|
|
7
|
|
|
|
3
|
|
|
|
|
95
|
|
|
5
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
|
3
|
|
|
|
|
5
|
|
|
|
3
|
|
|
|
|
97
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
16
|
use base qw(URI); |
|
|
3
|
|
|
|
|
5
|
|
|
|
3
|
|
|
|
|
8187
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
|
36105
|
use Carp (); |
|
|
3
|
|
|
|
|
7
|
|
|
|
3
|
|
|
|
|
5068
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 NAME |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
URI::cid - RFC 2392 cid: URI implementation |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 VERSION |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
Version 0.02 |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=cut |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
use URI; |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
my $cid = $URI->new('cid:'); |
|
29
|
|
|
|
|
|
|
$cid->cid('c6a62d04-1037-475e-a2be-ea38f9a78b64@foobar.local') |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# or, pull it straight from the header: |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
my $cid = URI::cid->parse($mimepart->header('Content-ID')); |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# and put it back: |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
$mimepart->header('Content-ID' => $cid->format); |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
L defines a |
|
42
|
|
|
|
|
|
|
straight-forward method of expressing the contents of email |
|
43
|
|
|
|
|
|
|
C and C headers as URIs. This module provides |
|
44
|
|
|
|
|
|
|
some utility methods for working with them. |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 METHODS |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head2 cid |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Get or set the C. |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=cut |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub cid { |
|
55
|
2
|
|
|
2
|
1
|
2
|
my $self = shift; |
|
56
|
2
|
|
|
|
|
9
|
$self->opaque(@_); |
|
57
|
|
|
|
|
|
|
} |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head2 parse |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Parse (i.e., remove the confining angle-brackets from) a C |
|
62
|
|
|
|
|
|
|
header. |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=cut |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub parse { |
|
67
|
1
|
|
|
1
|
1
|
408
|
my ($self, $string) = @_; |
|
68
|
1
|
50
|
|
|
|
7
|
$self = URI->new('cid:') unless ref $self; |
|
69
|
|
|
|
|
|
|
|
|
70
|
1
|
|
|
|
|
168
|
$string =~ s/^\s*<([^>]*)>\s*$/$1/; |
|
71
|
1
|
|
|
|
|
4
|
$self->cid($string); |
|
72
|
1
|
|
|
|
|
133
|
$self; |
|
73
|
|
|
|
|
|
|
} |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head2 format |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Format a C URI as a C header value. |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=cut |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
sub format { |
|
82
|
1
|
|
|
1
|
1
|
292
|
sprintf '<%s>', shift->cid; |
|
83
|
|
|
|
|
|
|
} |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=over 4 |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=item L |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=item L |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=item L |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=back |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head1 AUTHOR |
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Dorian Taylor, C<< >> |
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head1 BUGS |
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
Please report any bugs or feature requests to C
|
|
104
|
|
|
|
|
|
|
rt.cpan.org>, or through the web interface at |
|
105
|
|
|
|
|
|
|
L. I will be |
|
106
|
|
|
|
|
|
|
notified, and then you'll automatically be notified of progress on |
|
107
|
|
|
|
|
|
|
your bug as I make changes. |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head1 SUPPORT |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
perldoc URI::cid |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
You can also look for information at: |
|
116
|
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=over 4 |
|
118
|
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker (report bugs here) |
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
L |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
|
124
|
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
L |
|
126
|
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=item * CPAN Ratings |
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
L |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=item * Search CPAN |
|
132
|
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
L |
|
134
|
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=back |
|
136
|
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
|
138
|
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
Copyright 2012 Dorian Taylor. |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License"); you |
|
142
|
|
|
|
|
|
|
may not use this file except in compliance with the License. You may |
|
143
|
|
|
|
|
|
|
obtain a copy of the License at |
|
144
|
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
L |
|
146
|
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software |
|
148
|
|
|
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS, |
|
149
|
|
|
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
|
150
|
|
|
|
|
|
|
implied. See the License for the specific language governing |
|
151
|
|
|
|
|
|
|
permissions and limitations under the License. |
|
152
|
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=cut |
|
155
|
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
1; # End of URI::cid |