line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Acme::MadokaMagica::TvMembers; |
2
|
3
|
|
|
3
|
|
1304
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
89
|
|
3
|
3
|
|
|
3
|
|
17
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
85
|
|
4
|
3
|
|
|
3
|
|
15
|
use utf8; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
15
|
|
5
|
3
|
|
|
3
|
|
1475
|
use Data::Section::Simple; |
|
3
|
|
|
|
|
1634
|
|
|
3
|
|
|
|
|
152
|
|
6
|
3
|
|
|
3
|
|
1602
|
use YAML::Tiny; |
|
3
|
|
|
|
|
17021
|
|
|
3
|
|
|
|
|
2552
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
18
|
|
|
18
|
0
|
13320
|
my ($class, %args) = @_; |
10
|
|
|
|
|
|
|
|
11
|
18
|
|
|
|
|
54
|
my $self = { _has_qb => undef }; |
12
|
18
|
|
|
|
|
80
|
my $ds = Data::Section::Simple->new($class); |
13
|
18
|
|
|
|
|
145
|
my $sections = $ds->get_data_section; |
14
|
18
|
|
|
|
|
1745
|
for my $section_name ( keys %{$sections} ) { |
|
18
|
|
|
|
|
81
|
|
15
|
18
|
|
|
|
|
91
|
my $yml = YAML::Tiny->read_string($sections->{$section_name}); |
16
|
18
|
|
|
|
|
9717
|
my $member_info = $yml->[0]; |
17
|
18
|
|
|
|
|
33
|
for my $key ( keys %{$member_info} ) { |
|
18
|
|
|
|
|
88
|
|
18
|
162
|
|
|
|
|
444
|
$self->{$key} = $member_info->{$key}; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
} |
21
|
18
|
100
|
|
|
|
54
|
if (defined $args{line}) { |
22
|
13
|
|
|
|
|
27
|
$self->{startline} = $args{line}; |
23
|
|
|
|
|
|
|
} else { |
24
|
5
|
|
|
|
|
22
|
$self->{startline} = (caller)[2]; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
18
|
|
|
|
|
123
|
return bless $self, $class; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub has_qb { |
31
|
46
|
|
|
46
|
0
|
124
|
my $self = shift; |
32
|
|
|
|
|
|
|
|
33
|
46
|
100
|
|
|
|
107
|
if (@_){ |
34
|
7
|
|
|
|
|
12
|
$self->{_has_qb} = shift; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
46
|
|
|
|
|
300
|
return $self->{_has_qb}; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub name { |
41
|
16
|
|
|
16
|
0
|
4389
|
my ($self) = @_; |
42
|
16
|
|
|
|
|
53
|
my $line = (caller)[2]; |
43
|
|
|
|
|
|
|
|
44
|
16
|
|
|
|
|
44
|
my $limit = $self->{startline} +100; |
45
|
16
|
|
|
|
|
185
|
print "$line : $limit\n"; |
46
|
16
|
50
|
|
|
|
92
|
if( $line >= $limit ) { |
47
|
0
|
|
|
|
|
0
|
return undef; |
48
|
|
|
|
|
|
|
} |
49
|
16
|
100
|
|
|
|
51
|
return $self->has_qb ? $self->{witchename} : $self->lastname.' '.$self->firstname; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub firstname { |
53
|
14
|
|
|
14
|
0
|
29
|
my $self = shift; |
54
|
14
|
|
|
|
|
38
|
my $line = (caller)[2]; |
55
|
|
|
|
|
|
|
|
56
|
14
|
|
|
|
|
30
|
my $limit = $self->{startline} +100; |
57
|
14
|
50
|
|
|
|
36
|
if($line >= $limit ) { |
58
|
0
|
|
|
|
|
0
|
return undef; |
59
|
|
|
|
|
|
|
} |
60
|
14
|
|
|
|
|
82
|
return $self->{firstname}; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub birthday { |
64
|
5
|
|
|
5
|
0
|
11
|
my $self = shift; |
65
|
5
|
|
|
|
|
17
|
my $line = (caller)[2]; |
66
|
|
|
|
|
|
|
|
67
|
5
|
|
|
|
|
16
|
my $limit = $self->{startline} +100; |
68
|
5
|
50
|
|
|
|
13
|
if($line >= $limit ) { |
69
|
0
|
|
|
|
|
0
|
return undef; |
70
|
|
|
|
|
|
|
} |
71
|
5
|
|
|
|
|
36
|
return $self->{birthday}; |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub blood_type { |
75
|
5
|
|
|
5
|
0
|
13
|
my $self = shift; |
76
|
5
|
|
|
|
|
18
|
my $line = (caller)[2]; |
77
|
|
|
|
|
|
|
|
78
|
5
|
|
|
|
|
14
|
my $limit = $self->{startline} +100; |
79
|
5
|
50
|
|
|
|
18
|
if( $line >= $limit ) { |
80
|
0
|
|
|
|
|
0
|
return undef; |
81
|
|
|
|
|
|
|
} |
82
|
5
|
|
|
|
|
24
|
return $self->{blood_type}; |
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
sub lastname { |
86
|
14
|
|
|
14
|
0
|
29
|
my $self = shift; |
87
|
14
|
|
|
|
|
49
|
my $line = (caller)[2]; |
88
|
|
|
|
|
|
|
|
89
|
14
|
|
|
|
|
35
|
my $limit = $self->{startline} +100; |
90
|
14
|
50
|
|
|
|
36
|
if( $line >= $limit ) { |
91
|
0
|
|
|
|
|
0
|
return undef; |
92
|
|
|
|
|
|
|
} |
93
|
14
|
|
|
|
|
76
|
return $self->{lastname}; |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
sub age { |
97
|
5
|
|
|
5
|
0
|
13
|
my $self = shift; |
98
|
5
|
|
|
|
|
19
|
my $line = (caller)[2]; |
99
|
|
|
|
|
|
|
|
100
|
5
|
|
|
|
|
13
|
my $limit = $self->{startline} +100; |
101
|
5
|
50
|
|
|
|
19
|
if( $line >= $limit ) { |
102
|
0
|
|
|
|
|
0
|
return undef; |
103
|
|
|
|
|
|
|
} |
104
|
5
|
|
|
|
|
22
|
return $self->{age}; |
105
|
|
|
|
|
|
|
} |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
sub color{ |
108
|
15
|
|
|
15
|
0
|
1478
|
my ($self) = @_; |
109
|
15
|
|
|
|
|
51
|
my $line = (caller)[2]; |
110
|
|
|
|
|
|
|
|
111
|
15
|
|
|
|
|
71
|
my $limit = $self->{startline} +100; |
112
|
15
|
100
|
|
|
|
52
|
if( $line >= $limit ) { |
113
|
2
|
|
|
|
|
8
|
return undef; |
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
|
116
|
13
|
100
|
|
|
|
38
|
return $self->has_qb ? "black" : $self->{color}; |
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
sub qb { |
120
|
7
|
|
|
7
|
0
|
52
|
my ($self) = @_; |
121
|
7
|
|
|
|
|
44
|
my $line = (caller)[2]; |
122
|
|
|
|
|
|
|
|
123
|
7
|
|
|
|
|
25
|
my $limit = $self->{startline} +100; |
124
|
7
|
50
|
|
|
|
22
|
if( $line >= $limit ) { |
125
|
0
|
|
|
|
|
0
|
return undef; |
126
|
|
|
|
|
|
|
} |
127
|
|
|
|
|
|
|
|
128
|
7
|
|
|
|
|
21
|
$self->has_qb(1); |
129
|
|
|
|
|
|
|
} |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
sub say { |
132
|
8
|
|
|
8
|
0
|
1346
|
my ($self) = @_; |
133
|
8
|
|
|
|
|
28
|
my $line = (caller)[2]; |
134
|
|
|
|
|
|
|
|
135
|
8
|
|
|
|
|
25
|
my $limit = $self->{startline} +100; |
136
|
8
|
50
|
|
|
|
27
|
if( $line >= $limit ) { |
137
|
0
|
|
|
|
|
0
|
return undef; |
138
|
|
|
|
|
|
|
} |
139
|
8
|
|
|
|
|
38
|
return $self->{say}; |
140
|
|
|
|
|
|
|
} |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
sub cv { |
143
|
5
|
|
|
5
|
0
|
13
|
my $self = shift; |
144
|
5
|
|
|
|
|
19
|
my $line = (caller)[2]; |
145
|
|
|
|
|
|
|
|
146
|
5
|
|
|
|
|
13
|
my $limit = $self->{startline} +100; |
147
|
5
|
50
|
|
|
|
18
|
if( $line >= $limit ) { |
148
|
0
|
|
|
|
|
0
|
return undef; |
149
|
|
|
|
|
|
|
} |
150
|
5
|
|
|
|
|
30
|
return $self->{cv}; |
151
|
|
|
|
|
|
|
} |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
1; |