line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JMAP::Validation::Generators::ContactGroup; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
676
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
43
|
|
4
|
2
|
|
|
2
|
|
6
|
use warnings; |
|
2
|
|
|
|
|
1
|
|
|
2
|
|
|
|
|
35
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
596
|
use JMAP::Validation::Generators::String; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
69
|
|
7
|
2
|
|
|
2
|
|
10
|
use JSON::Typist; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
176
|
|
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
|
|
|
|
|
1132
|
|
14
|
|
|
|
|
|
|
1..2; |
15
|
|
|
|
|
|
|
|
16
|
2
|
|
|
|
|
88
|
my @ContactGroups; |
17
|
|
|
|
|
|
|
|
18
|
2
|
|
|
|
|
8
|
foreach my $contactIds ([@contactIds], []) { |
19
|
|
|
|
|
|
|
push @ContactGroups, { |
20
|
4
|
50
|
|
|
|
80
|
($args{no_id} ? () : (id => JMAP::Validation::Generators::String->generate())), |
21
|
|
|
|
|
|
|
name => JMAP::Validation::Generators::String->generate(), |
22
|
|
|
|
|
|
|
contactIds => $contactIds, |
23
|
|
|
|
|
|
|
}; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
2
|
|
|
|
|
65
|
return @ContactGroups; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |