summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-03-18 21:38:46 +0100
committerDaniel Friesel <derf@finalrewind.org>2020-03-18 21:38:46 +0100
commit15cc92cbee66b0d3c7bc0da6703678d3bf0dc6b5 (patch)
tree1044f906c16c41c03b019e5511dfe30623bb2aaa
parent62714701b2eef48da12078048e03bec3f9d9abad (diff)
Result: Handle undefined type or train_no
-rw-r--r--lib/Travel/Status/DE/IRIS/Result.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Travel/Status/DE/IRIS/Result.pm b/lib/Travel/Status/DE/IRIS/Result.pm
index d5c4845..2b9adaa 100644
--- a/lib/Travel/Status/DE/IRIS/Result.pm
+++ b/lib/Travel/Status/DE/IRIS/Result.pm
@@ -670,8 +670,9 @@ sub info {
sub line {
my ($self) = @_;
- return
- sprintf( '%s %s', $self->{type}, $self->{line_no} // $self->{train_no} );
+ return sprintf( '%s %s',
+ $self->{type} // 'Zug',
+ $self->{line_no} // $self->{train_no} // '-' );
}
sub route_pre {