line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Travel::Status::DE::EFA::Line; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
20
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
59
|
|
4
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
44
|
|
5
|
2
|
|
|
2
|
|
31
|
use 5.010; |
|
2
|
|
|
|
|
7
|
|
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
13
|
use parent 'Class::Accessor'; |
|
2
|
|
|
|
|
16
|
|
|
2
|
|
|
|
|
15
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '1.22'; |
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
|
318
|
my ( $obj, %conf ) = @_; |
21
|
|
|
|
|
|
|
|
22
|
54
|
|
|
|
|
96
|
my $ref = \%conf; |
23
|
|
|
|
|
|
|
|
24
|
54
|
|
|
|
|
236
|
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__ |