line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Random::AcademicTitle::CZ; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
74671
|
use strict; |
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
56
|
|
4
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
55
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
1004
|
use Class::Utils qw(set_params); |
|
2
|
|
|
|
|
27641
|
|
|
2
|
|
|
|
|
39
|
|
7
|
2
|
|
|
2
|
|
144
|
use Readonly; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
725
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Readonly::Array our @TITLES_AFTER => ( |
10
|
|
|
|
|
|
|
'Ph.D.', |
11
|
|
|
|
|
|
|
'Th.D.', |
12
|
|
|
|
|
|
|
'DiS.', |
13
|
|
|
|
|
|
|
'DSc.', |
14
|
|
|
|
|
|
|
); |
15
|
|
|
|
|
|
|
Readonly::Array our @TITLES_AFTER_OLD => ( |
16
|
|
|
|
|
|
|
'CSc.', |
17
|
|
|
|
|
|
|
'DrSc.', |
18
|
|
|
|
|
|
|
'Dr.', |
19
|
|
|
|
|
|
|
'Th.D.', |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
Readonly::Array our @TITLES_BEFORE => ( |
22
|
|
|
|
|
|
|
'prof.', |
23
|
|
|
|
|
|
|
'doc.', |
24
|
|
|
|
|
|
|
'MUDr.', |
25
|
|
|
|
|
|
|
'MVDr.', |
26
|
|
|
|
|
|
|
'MDDr.', |
27
|
|
|
|
|
|
|
'PharmDr.', |
28
|
|
|
|
|
|
|
'JUDr.', |
29
|
|
|
|
|
|
|
'PhDr.', |
30
|
|
|
|
|
|
|
'RNDr.', |
31
|
|
|
|
|
|
|
'ThDr.', |
32
|
|
|
|
|
|
|
'Ing.', |
33
|
|
|
|
|
|
|
'Ing. arch.', |
34
|
|
|
|
|
|
|
'Mgr.', |
35
|
|
|
|
|
|
|
'MgA.', |
36
|
|
|
|
|
|
|
'Bc.', |
37
|
|
|
|
|
|
|
'BcA.', |
38
|
|
|
|
|
|
|
'ThLic.', |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
Readonly::Array our @TITLES_BEFORE_OLD => ( |
41
|
|
|
|
|
|
|
'akad. arch.', |
42
|
|
|
|
|
|
|
'akad. mal.', |
43
|
|
|
|
|
|
|
'ak. soch.', |
44
|
|
|
|
|
|
|
'MSDr.', |
45
|
|
|
|
|
|
|
'PaedDr.', |
46
|
|
|
|
|
|
|
'PhMr.', |
47
|
|
|
|
|
|
|
'RSDr.', |
48
|
|
|
|
|
|
|
'RTDr.', |
49
|
|
|
|
|
|
|
'RCDr.', |
50
|
|
|
|
|
|
|
'ThMgr.', |
51
|
|
|
|
|
|
|
); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
our $VERSION = 0.02; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
# Constructor. |
56
|
|
|
|
|
|
|
sub new { |
57
|
0
|
|
|
0
|
1
|
|
my ($class, @params) = @_; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
# Create object. |
60
|
0
|
|
|
|
|
|
my $self = bless {}, $class; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
# Set up old titles. |
63
|
0
|
|
|
|
|
|
$self->{'old'} = 0; |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
# Process parameters. |
66
|
0
|
|
|
|
|
|
set_params($self, @params); |
67
|
|
|
|
|
|
|
|
68
|
0
|
|
|
|
|
|
return $self; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub random_title_after { |
72
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
73
|
|
|
|
|
|
|
|
74
|
0
|
|
|
|
|
|
my @titles = @TITLES_AFTER; |
75
|
0
|
0
|
|
|
|
|
if ($self->{'old'}) { |
76
|
0
|
|
|
|
|
|
push @titles, @TITLES_AFTER_OLD; |
77
|
|
|
|
|
|
|
} |
78
|
0
|
|
|
|
|
|
my $title = $titles[int(rand(@titles))]; |
79
|
|
|
|
|
|
|
|
80
|
0
|
|
|
|
|
|
return $title; |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
sub random_title_before { |
84
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
85
|
|
|
|
|
|
|
|
86
|
0
|
|
|
|
|
|
my @titles = @TITLES_BEFORE; |
87
|
0
|
0
|
|
|
|
|
if ($self->{'old'}) { |
88
|
0
|
|
|
|
|
|
push @titles, @TITLES_BEFORE_OLD; |
89
|
|
|
|
|
|
|
} |
90
|
0
|
|
|
|
|
|
my $title = $titles[int(rand(@titles))]; |
91
|
|
|
|
|
|
|
|
92
|
0
|
|
|
|
|
|
return $title; |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
1; |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
__END__ |