line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Travel::Status::DE::EFA::Line; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
16
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
63
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
48
|
|
5
|
2
|
|
|
2
|
|
43
|
use 5.010; |
|
2
|
|
|
|
|
8
|
|
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
12
|
use parent 'Class::Accessor'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
18
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '1.20'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Travel::Status::DE::EFA::Line->mk_ro_accessors( |
12
|
|
|
|
|
|
|
qw(direction mot name operator route type valid)); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my @mot_mapping = qw{ |
15
|
|
|
|
|
|
|
zug s-bahn u-bahn stadtbahn tram stadtbus regionalbus |
16
|
|
|
|
|
|
|
schnellbus seilbahn schiff ast sonstige |
17
|
|
|
|
|
|
|
}; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new { |
20
|
54
|
|
|
54
|
1
|
285
|
my ( $obj, %conf ) = @_; |
21
|
|
|
|
|
|
|
|
22
|
54
|
|
|
|
|
96
|
my $ref = \%conf; |
23
|
|
|
|
|
|
|
|
24
|
54
|
|
|
|
|
211
|
return bless( $ref, $obj ); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub mot_name { |
28
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
0
|
|
|
|
return $mot_mapping[ $self->{mot} ] // 'sonstige'; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub TO_JSON { |
34
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
return { %{$self} }; |
|
0
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |