diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-03-02 18:43:00 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-03-02 18:43:00 +0100 |
commit | 7d1bf77228a649590870673865cbce1cae076eef (patch) | |
tree | 2486c36ee803b62786bda95f32da41a1b820c49e /lib | |
parent | 66b43a4aa449d3340dc8adb763539b3fc72f2f82 (diff) |
result_has_via: handle HAFAS::Journey entries
Closes #18
Diffstat (limited to 'lib')
-rw-r--r-- | lib/DBInfoscreen/Controller/Stationboard.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index db69b7e..06ce041 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -210,7 +210,9 @@ sub result_has_train_type { sub result_has_via { my ( $result, $via ) = @_; - my @route = $result->route_post; + my @route + = $result->can('route_post') ? $result->route_post : map { $_->loc->name } + $result->route; my $eq_result = List::MoreUtils::any { lc eq lc($via) } @route; |