summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/DBWagenreihung.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-06-23 16:53:01 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-06-23 16:53:01 +0200
commit77777eb14cdcdccd744453f2f30153d430aa4e66 (patch)
tree4de39d90ef069714d6cb1f74ec95f63af467e3b5 /lib/Travel/Status/DE/DBWagenreihung.pm
parentc849a88b4ef549de2810b7f0e2b544bb7e88149e (diff)
->direction: Compute direction if necessary
Diffstat (limited to 'lib/Travel/Status/DE/DBWagenreihung.pm')
-rw-r--r--lib/Travel/Status/DE/DBWagenreihung.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/DBWagenreihung.pm b/lib/Travel/Status/DE/DBWagenreihung.pm
index ea37382..1952646 100644
--- a/lib/Travel/Status/DE/DBWagenreihung.pm
+++ b/lib/Travel/Status/DE/DBWagenreihung.pm
@@ -102,6 +102,12 @@ sub errstr {
sub direction {
my ($self) = @_;
+ if ( not exists $self->{direction} ) {
+
+ # direction is set while parsing wagons
+ $self->wagons;
+ }
+
return $self->{direction};
}