From 669aa8b72cdf6d57d6f5f35d50f2a7e2489478e4 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Thu, 3 Oct 2024 20:24:46 +0200 Subject: Trip->TO_JSON: Ensure that route is present --- lib/Travel/Status/DE/EFA/Trip.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Travel/Status/DE/EFA/Trip.pm b/lib/Travel/Status/DE/EFA/Trip.pm index e6c1b8e..37e5284 100644 --- a/lib/Travel/Status/DE/EFA/Trip.pm +++ b/lib/Travel/Status/DE/EFA/Trip.pm @@ -109,6 +109,9 @@ sub route { sub TO_JSON { my ($self) = @_; + # lazy loading + $self->route; + my $ret = { %{$self} }; delete $ret->{strptime_obj}; -- cgit v1.2.3