diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-03-18 21:38:46 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-03-18 21:38:46 +0100 |
commit | 15cc92cbee66b0d3c7bc0da6703678d3bf0dc6b5 (patch) | |
tree | 1044f906c16c41c03b019e5511dfe30623bb2aaa /lib/Travel/Status | |
parent | 62714701b2eef48da12078048e03bec3f9d9abad (diff) |
Result: Handle undefined type or train_no
Diffstat (limited to 'lib/Travel/Status')
-rw-r--r-- | lib/Travel/Status/DE/IRIS/Result.pm | 5 |
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 { |