summaryrefslogtreecommitdiff
path: root/lib/Travel
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-08-30 16:38:36 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2025-08-30 16:38:36 +0200
commitd70f29b1794b7ccb1e4cd77c563653578ea74dd5 (patch)
tree68b714cc7f5edfaebf14c176cdc529b607fb1560 /lib/Travel
parent06f32b4573bad467499839c4a29eda7d95359969 (diff)
polyline: warn rather than running untested code
Diffstat (limited to 'lib/Travel')
-rw-r--r--lib/Travel/Status/DE/EFA/Trip.pm17
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/Travel/Status/DE/EFA/Trip.pm b/lib/Travel/Status/DE/EFA/Trip.pm
index 070c427..461b989 100644
--- a/lib/Travel/Status/DE/EFA/Trip.pm
+++ b/lib/Travel/Status/DE/EFA/Trip.pm
@@ -117,15 +117,18 @@ sub polyline {
if ( $min_dist{$key} ) {
if ( defined $self->{polyline}[ $min_dist{$key}{index} ]{stop} )
{
- # XXX experimental and untested
- # one polyline entry maps to multiple stops → duplicate it; insert $stop after the already-present entry
- $min_dist{$key}{index} += 1;
- splice(
- @{ $self->{polyline} },
- $min_dist{$key}{index},
- 0, { %{ $self->{polyline}[ $min_dist{$key}{index} ] } }
+ warn(
+"$key: overwriting stop ref at $min_dist{$key}{index} with $key"
);
+ # XXX experimental and untested
+ # one polyline entry maps to multiple stops → duplicate it; insert $stop after the already-present entry
+ #$min_dist{$key}{index} += 1;
+ #splice(
+ # @{ $self->{polyline} },
+ # $min_dist{$key}{index},
+ # 0, { %{ $self->{polyline}[ $min_dist{$key}{index} ] } }
+ #);
}
$self->{polyline}[ $min_dist{$key}{index} ]{stop}
= $stop;