| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package JMAP::Validation::Generators::ContactInformation; |
|
2
|
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
339
|
use strict; |
|
|
3
|
|
|
|
|
3
|
|
|
|
3
|
|
|
|
|
67
|
|
|
4
|
3
|
|
|
3
|
|
7
|
use warnings; |
|
|
3
|
|
|
|
|
4
|
|
|
|
3
|
|
|
|
|
54
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
284
|
use JMAP::Validation::Generators::String; |
|
|
3
|
|
|
|
|
4
|
|
|
|
3
|
|
|
|
|
46
|
|
|
7
|
3
|
|
|
3
|
|
11
|
use JSON::PP; |
|
|
3
|
|
|
|
|
2
|
|
|
|
3
|
|
|
|
|
125
|
|
|
8
|
3
|
|
|
3
|
|
11
|
use JSON::Typist; |
|
|
3
|
|
|
|
|
3
|
|
|
|
3
|
|
|
|
|
363
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
my %types = ( |
|
11
|
|
|
|
|
|
|
emails => [qw{ |
|
12
|
|
|
|
|
|
|
personal |
|
13
|
|
|
|
|
|
|
work |
|
14
|
|
|
|
|
|
|
other |
|
15
|
|
|
|
|
|
|
}], |
|
16
|
|
|
|
|
|
|
phones => [qw{ |
|
17
|
|
|
|
|
|
|
home |
|
18
|
|
|
|
|
|
|
work |
|
19
|
|
|
|
|
|
|
mobile |
|
20
|
|
|
|
|
|
|
fax |
|
21
|
|
|
|
|
|
|
pager |
|
22
|
|
|
|
|
|
|
other |
|
23
|
|
|
|
|
|
|
}], |
|
24
|
|
|
|
|
|
|
online => [qw{ |
|
25
|
|
|
|
|
|
|
uri |
|
26
|
|
|
|
|
|
|
username |
|
27
|
|
|
|
|
|
|
other |
|
28
|
|
|
|
|
|
|
}], |
|
29
|
|
|
|
|
|
|
); |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub generate { |
|
32
|
9
|
|
|
9
|
0
|
272
|
my ($type) = @_; |
|
33
|
|
|
|
|
|
|
|
|
34
|
9
|
|
|
|
|
10
|
my @ContactInformation; |
|
35
|
|
|
|
|
|
|
|
|
36
|
9
|
50
|
|
|
|
10
|
foreach my $type_value (@{$types{$type} || []}) { |
|
|
9
|
|
|
|
|
29
|
|
|
37
|
36
|
|
|
|
|
934
|
foreach my $label (JMAP::Validation::Generators::String->generate(), undef) { |
|
38
|
72
|
|
|
|
|
3271
|
foreach my $isDefault (JSON::PP::true, JSON::PP::false) { |
|
39
|
144
|
|
|
|
|
2362
|
push @ContactInformation, { |
|
40
|
|
|
|
|
|
|
type => JSON::Typist::String->new($type_value), |
|
41
|
|
|
|
|
|
|
label => $label, |
|
42
|
|
|
|
|
|
|
value => JMAP::Validation::Generators::String->generate(), |
|
43
|
|
|
|
|
|
|
isDefault => $isDefault, |
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
} |
|
46
|
|
|
|
|
|
|
} |
|
47
|
|
|
|
|
|
|
} |
|
48
|
|
|
|
|
|
|
|
|
49
|
9
|
|
|
|
|
301
|
return @ContactInformation; |
|
50
|
|
|
|
|
|
|
} |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |