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