line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JMAP::Validation::Generators::Address; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
400
|
use strict; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
66
|
|
4
|
3
|
|
|
3
|
|
8
|
use warnings; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
55
|
|
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
840
|
use JMAP::Validation::Generators::String; |
|
3
|
|
|
|
|
19
|
|
|
3
|
|
|
|
|
64
|
|
7
|
3
|
|
|
3
|
|
13
|
use JSON::PP; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
159
|
|
8
|
3
|
|
|
3
|
|
13
|
use JSON::Typist; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
306
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub generate { |
11
|
3
|
|
|
3
|
0
|
63
|
my @Addresses; |
12
|
|
|
|
|
|
|
|
13
|
3
|
|
|
|
|
8
|
foreach my $type (qw{home work billing postal other}) { |
14
|
15
|
|
|
|
|
413
|
foreach my $label (JMAP::Validation::Generators::String->generate(), undef) { |
15
|
30
|
|
|
|
|
2144
|
foreach my $isDefault (JSON::PP::true, JSON::PP::false) { |
16
|
60
|
|
|
|
|
1154
|
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
|
|
|
|
|
126
|
return @Addresses; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |