From 1608d648420def2bdcf54f46c00fa2ebd9ba8bf9 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 20 Sep 2015 13:04:20 +0200 Subject: result->info: return undef if no info is available --- lib/Travel/Status/DE/HAFAS.pm | 4 +--- lib/Travel/Status/DE/HAFAS/Result.pm | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'lib/Travel') diff --git a/lib/Travel/Status/DE/HAFAS.pm b/lib/Travel/Status/DE/HAFAS.pm index ab12cc2..28d069b 100644 --- a/lib/Travel/Status/DE/HAFAS.pm +++ b/lib/Travel/Status/DE/HAFAS.pm @@ -305,11 +305,9 @@ sub results { substr( $date, 6, 0, '20' ); - $info //= q{}; - # delayReason=" " means no delay reason if ( $info eq q{ } ) { - $info = q{}; + $info = undef; } $train =~ s{#.*$}{}; diff --git a/lib/Travel/Status/DE/HAFAS/Result.pm b/lib/Travel/Status/DE/HAFAS/Result.pm index fa1acb7..cdb74df 100644 --- a/lib/Travel/Status/DE/HAFAS/Result.pm +++ b/lib/Travel/Status/DE/HAFAS/Result.pm @@ -11,7 +11,7 @@ use parent 'Class::Accessor'; our $VERSION = '1.05'; Travel::Status::DE::HAFAS::Result->mk_ro_accessors( - qw(date info raw_e_delay raw_delay time train route_end info_raw)); + qw(date info raw_e_delay raw_delay time train route_end)); sub new { my ( $obj, %conf ) = @_; @@ -169,7 +169,7 @@ Also returns undef if the arrival/departure has been cancelled. =item $result->info Returns additional information, for instance the most recent delay reason. -Returns an empty string if no (useful) information is available. +undef if no (useful) information is available. =item $result->is_cancelled -- cgit v1.2.3