summaryrefslogtreecommitdiff
path: root/lib/DBInfoscreen/Controller
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-07-18 11:34:52 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-07-18 11:34:52 +0200
commitad30b7bb175d3a2a94676430b96f21ace4b356b0 (patch)
tree0c88a7dac282208e5a239b722dc0ebe893115e23 /lib/DBInfoscreen/Controller
parent6d29e0696bfb93f97f999d72f972bb5f124cb8a0 (diff)
Remove legacy $result->can checks (leftover from T-S-DE-DB support)
Diffstat (limited to 'lib/DBInfoscreen/Controller')
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm10
1 files changed, 2 insertions, 8 deletions
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 {
{