line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mock::Person; |
2
|
|
|
|
|
|
|
{ |
3
|
|
|
|
|
|
|
$Mock::Person::VERSION = '1.1.0'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: generates random last, first and middle name of person. |
7
|
|
|
|
|
|
|
# ENCODING: UTF-8 |
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
68057
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
79
|
|
10
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
62
|
|
11
|
2
|
|
|
2
|
|
939
|
use utf8; |
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
11
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub name { |
15
|
5
|
|
|
5
|
1
|
25
|
my (%h) = @_; |
16
|
|
|
|
|
|
|
|
17
|
5
|
|
|
|
|
10
|
my $sex = $h{sex}; |
18
|
5
|
|
|
|
|
7
|
my $country= $h{country}; |
19
|
|
|
|
|
|
|
|
20
|
5
|
|
100
|
|
|
16
|
$sex ||= "male"; |
21
|
5
|
|
100
|
|
|
18
|
$country ||= "ru"; |
22
|
|
|
|
|
|
|
|
23
|
5
|
50
|
|
|
|
15
|
if (uc($country) eq "RU") { |
|
|
0
|
|
|
|
|
|
24
|
2
|
|
|
2
|
|
1767
|
use Mock::Person::RU; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
127
|
|
25
|
5
|
|
|
|
|
15
|
return Mock::Person::RU::name($sex); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
elsif (uc($country) eq "US") { |
28
|
2
|
|
|
2
|
|
1196
|
use Mock::Person::US; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
130
|
|
29
|
0
|
|
|
|
|
|
return Mock::Person::US::name($sex); |
30
|
|
|
|
|
|
|
}; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |