line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Travel::Routing::DE::EFA::Route::Part; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
17
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
76
|
|
4
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
146
|
|
5
|
2
|
|
|
2
|
|
39
|
use 5.010; |
|
2
|
|
|
|
|
8
|
|
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
13
|
use parent 'Class::Accessor'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
12
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '2.23'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my %occupancy = ( |
12
|
|
|
|
|
|
|
MANY_SEATS => 1, |
13
|
|
|
|
|
|
|
FEW_SEATS => 2, |
14
|
|
|
|
|
|
|
STANDING_ONLY => 3 |
15
|
|
|
|
|
|
|
); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
Travel::Routing::DE::EFA::Route::Part->mk_ro_accessors( |
18
|
|
|
|
|
|
|
qw(arrival_platform arrival_stop |
19
|
|
|
|
|
|
|
arrival_date arrival_time arrival_sdate arrival_stime delay |
20
|
|
|
|
|
|
|
departure_platform |
21
|
|
|
|
|
|
|
departure_stop departure_date departure_time departure_sdate |
22
|
|
|
|
|
|
|
departure_stime |
23
|
|
|
|
|
|
|
footpath_duration footpath_type |
24
|
|
|
|
|
|
|
occupancy |
25
|
|
|
|
|
|
|
train_destination train_line train_product |
26
|
|
|
|
|
|
|
) |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub new { |
30
|
10
|
|
|
10
|
1
|
103
|
my ( $obj, %conf ) = @_; |
31
|
|
|
|
|
|
|
|
32
|
10
|
|
|
|
|
23
|
my $ref = \%conf; |
33
|
|
|
|
|
|
|
|
34
|
10
|
50
|
33
|
|
|
28
|
if ( $ref->{occupancy} and exists $occupancy{ $ref->{occupancy} } ) { |
35
|
0
|
|
|
|
|
0
|
$ref->{occupancy} = $occupancy{ $ref->{occupancy} }; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
else { |
38
|
10
|
|
|
|
|
20
|
delete $ref->{occupancy}; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
10
|
|
|
|
|
41
|
return bless( $ref, $obj ); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub arrival_routemaps { |
45
|
2
|
|
|
2
|
1
|
8
|
my ($self) = @_; |
46
|
|
|
|
|
|
|
|
47
|
2
|
|
|
|
|
4
|
return @{ $self->{arrival_routemaps} }; |
|
2
|
|
|
|
|
14
|
|
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub arrival_stationmaps { |
51
|
2
|
|
|
2
|
1
|
5
|
my ($self) = @_; |
52
|
|
|
|
|
|
|
|
53
|
2
|
|
|
|
|
4
|
return @{ $self->{arrival_stationmaps} }; |
|
2
|
|
|
|
|
12
|
|
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub arrival_stop_and_platform { |
57
|
2
|
|
|
2
|
1
|
9087
|
my ($self) = @_; |
58
|
|
|
|
|
|
|
|
59
|
2
|
50
|
|
|
|
7
|
if ( length( $self->arrival_platform ) ) { |
60
|
|
|
|
|
|
|
return |
61
|
2
|
|
|
|
|
34
|
sprintf( '%s: %s', $self->get(qw(arrival_stop arrival_platform)) ); |
62
|
|
|
|
|
|
|
} |
63
|
0
|
|
|
|
|
0
|
return $self->arrival_stop; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub departure_routemaps { |
67
|
2
|
|
|
2
|
1
|
6
|
my ($self) = @_; |
68
|
|
|
|
|
|
|
|
69
|
2
|
|
|
|
|
4
|
return @{ $self->{departure_routemaps} }; |
|
2
|
|
|
|
|
11
|
|
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub departure_stationmaps { |
73
|
2
|
|
|
2
|
1
|
8
|
my ($self) = @_; |
74
|
|
|
|
|
|
|
|
75
|
2
|
|
|
|
|
4
|
return @{ $self->{departure_stationmaps} }; |
|
2
|
|
|
|
|
10
|
|
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
sub departure_stop_and_platform { |
79
|
2
|
|
|
2
|
1
|
5288
|
my ($self) = @_; |
80
|
|
|
|
|
|
|
|
81
|
2
|
50
|
|
|
|
8
|
if ( length( $self->departure_platform ) ) { |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
return |
84
|
2
|
|
|
|
|
32
|
sprintf( '%s: %s', |
85
|
|
|
|
|
|
|
$self->get(qw(departure_stop departure_platform)) ); |
86
|
|
|
|
|
|
|
} |
87
|
0
|
|
|
|
|
0
|
return $self->departure_stop; |
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
sub footpath_parts { |
91
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
92
|
|
|
|
|
|
|
|
93
|
0
|
0
|
|
|
|
0
|
if ( $self->{footpath_parts} ) { |
94
|
0
|
|
|
|
|
0
|
return @{ $self->{footpath_parts} }; |
|
0
|
|
|
|
|
0
|
|
95
|
|
|
|
|
|
|
} |
96
|
0
|
|
|
|
|
0
|
return; |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
sub is_cancelled { |
100
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
101
|
|
|
|
|
|
|
|
102
|
0
|
0
|
0
|
|
|
0
|
if ( $self->{delay} and $self->{delay} eq '-9999' ) { |
103
|
0
|
|
|
|
|
0
|
return 1; |
104
|
|
|
|
|
|
|
} |
105
|
0
|
|
|
|
|
0
|
return; |
106
|
|
|
|
|
|
|
} |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
# DEPRECATED |
109
|
|
|
|
|
|
|
sub extra { |
110
|
2
|
|
|
2
|
0
|
1309
|
my ($self) = @_; |
111
|
|
|
|
|
|
|
|
112
|
2
|
|
50
|
|
|
5
|
my @ret = map { $_->summary } @{ $self->{regular_notes} // [] }; |
|
1
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
10
|
|
113
|
|
|
|
|
|
|
|
114
|
2
|
|
|
|
|
33
|
return @ret; |
115
|
|
|
|
|
|
|
} |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
sub regular_notes { |
118
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
119
|
|
|
|
|
|
|
|
120
|
0
|
0
|
|
|
|
0
|
if ( $self->{regular_notes} ) { |
121
|
0
|
|
|
|
|
0
|
return @{ $self->{regular_notes} }; |
|
0
|
|
|
|
|
0
|
|
122
|
|
|
|
|
|
|
} |
123
|
0
|
|
|
|
|
0
|
return; |
124
|
|
|
|
|
|
|
} |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
sub current_notes { |
127
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
128
|
|
|
|
|
|
|
|
129
|
0
|
0
|
|
|
|
0
|
if ( $self->{current_notes} ) { |
130
|
0
|
|
|
|
|
0
|
return @{ $self->{current_notes} }; |
|
0
|
|
|
|
|
0
|
|
131
|
|
|
|
|
|
|
} |
132
|
0
|
|
|
|
|
0
|
return; |
133
|
|
|
|
|
|
|
} |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
sub via { |
136
|
1
|
|
|
1
|
1
|
3276
|
my ($self) = @_; |
137
|
|
|
|
|
|
|
|
138
|
1
|
|
50
|
|
|
2
|
return @{ $self->{via} // [] }; |
|
1
|
|
|
|
|
13
|
|
139
|
|
|
|
|
|
|
} |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
1; |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
__END__ |