line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Travel::Status::DE::EFA::Line; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
14
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
66
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
53
|
|
5
|
2
|
|
|
2
|
|
30
|
use 5.010; |
|
2
|
|
|
|
|
6
|
|
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
11
|
use parent 'Class::Accessor'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
16
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '1.21'; |
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
|
283
|
my ( $obj, %conf ) = @_; |
21
|
|
|
|
|
|
|
|
22
|
54
|
|
|
|
|
106
|
my $ref = \%conf; |
23
|
|
|
|
|
|
|
|
24
|
54
|
|
|
|
|
204
|
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__ |