summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/HAFAS.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-07-05 15:19:34 +0200
committerDaniel Friesel <derf@finalrewind.org>2020-07-05 15:19:34 +0200
commit220b3bf395fa4aa87a0b5b9c161ac6e59ba08d58 (patch)
tree4cefa5a6a25a12aca4a51f4ab16e934d7a1e043e /lib/Travel/Status/DE/HAFAS.pm
parentabf476761e14fbd190a4d06fad5f126dd2943cfc (diff)
Switch to HAFAS::Message class for message handling
Diffstat (limited to 'lib/Travel/Status/DE/HAFAS.pm')
-rw-r--r--lib/Travel/Status/DE/HAFAS.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Travel/Status/DE/HAFAS.pm b/lib/Travel/Status/DE/HAFAS.pm
index 4a74692..670cba6 100644
--- a/lib/Travel/Status/DE/HAFAS.pm
+++ b/lib/Travel/Status/DE/HAFAS.pm
@@ -13,6 +13,7 @@ use DateTime::Format::Strptime;
use List::Util qw(any);
use LWP::UserAgent;
use POSIX qw(strftime);
+use Travel::Status::DE::HAFAS::Message;
use Travel::Status::DE::HAFAS::Result;
use Travel::Status::DE::HAFAS::StopFinder;
use XML::LibXML;
@@ -299,11 +300,11 @@ sub add_message_node {
return $message;
}
}
- my $message = {
+ my $message = Travel::Status::DE::HAFAS::Message->new(
header => $header,
lead => $lead,
ref_count => 1,
- };
+ );
push( @{ $self->{messages} }, $message );
return $message;
}