diff options
author | Daniel Friesel <derf@finalrewind.org> | 2018-11-26 20:10:24 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2018-11-26 20:10:24 +0100 |
commit | be0380ac6020556120269a0deecba7ffef63dcb0 (patch) | |
tree | ad5269cad598da7a3b24094d3f16ab4d558e5f9d /lib/Travel/Status/DE/DBWagenreihung.pm | |
parent | 7085318c1ae616bc2fbd79c335276a0d3420e50f (diff) |
Use ::Section module for section data
Diffstat (limited to 'lib/Travel/Status/DE/DBWagenreihung.pm')
-rw-r--r-- | lib/Travel/Status/DE/DBWagenreihung.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Travel/Status/DE/DBWagenreihung.pm b/lib/Travel/Status/DE/DBWagenreihung.pm index b97e2bd..608702a 100644 --- a/lib/Travel/Status/DE/DBWagenreihung.pm +++ b/lib/Travel/Status/DE/DBWagenreihung.pm @@ -9,6 +9,7 @@ our $VERSION = '0.00'; use Carp qw(cluck confess); use JSON; use LWP::UserAgent; +use Travel::Status::DE::DBWagenreihung::Section; use Travel::Status::DE::DBWagenreihung::Wagon; sub new { @@ -92,13 +93,13 @@ sub sections { for my $section (@{$self->{data}{istformation}{halt}{allSektor}}) { my $pos = $section->{positionamgleis}; - push(@{$self->{sections}}, { + push(@{$self->{sections}}, Travel::Status::DE::DBWagenreihung::Section->new( name => $section->{sektorbezeichnung}, start_percent => $pos->{startprozent}, end_percent => $pos->{endeprozent}, start_meters => $pos->{startmeter}, end_meters => $pos->{endemeter}, - }); + )); } return @{$self->{sections} // []}; |