From ad30b7bb175d3a2a94676430b96f21ace4b356b0 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 18 Jul 2021 11:34:52 +0200 Subject: Remove legacy $result->can checks (leftover from T-S-DE-DB support) --- lib/DBInfoscreen/Controller/Stationboard.pm | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index 0d5a96a..5793ae5 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -166,10 +166,6 @@ sub result_has_train_type { sub result_has_via { my ( $result, $via ) = @_; - if ( not $result->can('route_post') ) { - return 1; - } - my @route = $result->route_post; my $eq_result = List::MoreUtils::any { lc eq lc($via) } @route; @@ -1169,10 +1165,8 @@ sub handle_result { delayArrival => $delay_arr, delayDeparture => $delay_dep, destination => $result->destination, - isCancelled => $result->can('is_cancelled') - ? $result->is_cancelled - : undef, - messages => { + isCancelled => $result->is_cancelled, + messages => { delay => [ map { { -- cgit v1.2.3