line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JMAP::Validation::Generators::Address; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
346
|
use strict; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
66
|
|
4
|
3
|
|
|
3
|
|
9
|
use warnings; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
59
|
|
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
865
|
use JMAP::Validation::Generators::String; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
82
|
|
7
|
3
|
|
|
3
|
|
28
|
use JSON::PP; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
145
|
|
8
|
3
|
|
|
3
|
|
13
|
use JSON::Typist; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
293
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub generate { |
11
|
3
|
|
|
3
|
0
|
64
|
my @Addresses; |
12
|
|
|
|
|
|
|
|
13
|
3
|
|
|
|
|
8
|
foreach my $type (qw{home work billing postal other}) { |
14
|
15
|
|
|
|
|
431
|
foreach my $label (JMAP::Validation::Generators::String->generate(), undef) { |
15
|
30
|
|
|
|
|
2069
|
foreach my $isDefault (JSON::PP::true, JSON::PP::false) { |
16
|
60
|
|
|
|
|
1118
|
push @Addresses, { |
17
|
|
|
|
|
|
|
type => JSON::Typist::String->new($type), |
18
|
|
|
|
|
|
|
label => $label, |
19
|
|
|
|
|
|
|
street => JMAP::Validation::Generators::String->generate(), |
20
|
|
|
|
|
|
|
locality => JMAP::Validation::Generators::String->generate(), |
21
|
|
|
|
|
|
|
region => JMAP::Validation::Generators::String->generate(), |
22
|
|
|
|
|
|
|
postcode => JMAP::Validation::Generators::String->generate(), |
23
|
|
|
|
|
|
|
country => JMAP::Validation::Generators::String->generate(), |
24
|
|
|
|
|
|
|
isDefault => $isDefault, |
25
|
|
|
|
|
|
|
}; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
3
|
|
|
|
|
112
|
return @Addresses; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |