line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JMAP::Validation::Generators::ContactGroup; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
714
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
45
|
|
4
|
2
|
|
|
2
|
|
6
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
35
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
556
|
use JMAP::Validation::Generators::String; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
41
|
|
7
|
2
|
|
|
2
|
|
9
|
use JSON::Typist; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
171
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub generate { |
10
|
2
|
|
|
2
|
0
|
103
|
my (%args) = @_; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my @contactIds |
13
|
2
|
|
|
|
|
6
|
= map { JMAP::Validation::Generators::String->generate() } |
|
4
|
|
|
|
|
1157
|
|
14
|
|
|
|
|
|
|
1..2; |
15
|
|
|
|
|
|
|
|
16
|
2
|
|
|
|
|
67
|
my @ContactGroups; |
17
|
|
|
|
|
|
|
|
18
|
2
|
|
|
|
|
5
|
foreach my $contactIds ([@contactIds], []) { |
19
|
|
|
|
|
|
|
push @ContactGroups, { |
20
|
4
|
50
|
|
|
|
76
|
($args{no_id} ? () : (id => JMAP::Validation::Generators::String->generate())), |
21
|
|
|
|
|
|
|
name => JMAP::Validation::Generators::String->generate(), |
22
|
|
|
|
|
|
|
contactIds => $contactIds, |
23
|
|
|
|
|
|
|
}; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
2
|
|
|
|
|
64
|
return @ContactGroups; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |