line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Acme::HidamariSketch::Apartment; |
2
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
73
|
|
3
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
50
|
|
4
|
2
|
|
|
2
|
|
9
|
use utf8; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
10
|
|
5
|
2
|
|
|
2
|
|
3473
|
use Data::Dumper; |
|
2
|
|
|
|
|
14675
|
|
|
2
|
|
|
|
|
535
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = "0.05"; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
12
|
4
|
|
|
4
|
0
|
9
|
my ($class, $args) = @_; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
4
|
|
|
|
|
21
|
my $self = bless { |
16
|
|
|
|
|
|
|
tenants => $args->{tenants}, |
17
|
|
|
|
|
|
|
year => $args->{year} |
18
|
|
|
|
|
|
|
}, $class; |
19
|
|
|
|
|
|
|
|
20
|
4
|
|
|
|
|
21
|
return $self; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub knock { |
24
|
21
|
|
|
21
|
0
|
668
|
my ($self, $knock_room) = @_; |
25
|
|
|
|
|
|
|
|
26
|
21
|
100
|
|
|
|
57
|
if (!defined $knock_room) { |
27
|
|
|
|
|
|
|
# 部屋が存在しない |
28
|
1
|
|
|
|
|
7
|
return undef; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
20
|
|
|
|
|
23
|
for my $tenant (@{$self->{tenants}}) { |
|
20
|
|
|
|
|
47
|
|
32
|
61
|
|
|
|
|
108
|
my $room_number = $tenant->{room_number}->{$self->{year}}; |
33
|
61
|
100
|
66
|
|
|
259
|
if (defined $room_number and $knock_room == $room_number) { |
34
|
19
|
|
|
|
|
99
|
return $tenant; |
35
|
|
|
|
|
|
|
}; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# 存在しない部屋番号 |
39
|
1
|
|
|
|
|
4
|
return undef; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|