summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-11-26 20:10:24 +0100
committerDaniel Friesel <derf@finalrewind.org>2018-11-26 20:10:24 +0100
commitbe0380ac6020556120269a0deecba7ffef63dcb0 (patch)
treead5269cad598da7a3b24094d3f16ab4d558e5f9d /bin
parent7085318c1ae616bc2fbd79c335276a0d3420e50f (diff)
Use ::Section module for section data
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dbwagenreihung4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/dbwagenreihung b/bin/dbwagenreihung
index 0d75fd7..dafefe3 100755
--- a/bin/dbwagenreihung
+++ b/bin/dbwagenreihung
@@ -33,7 +33,7 @@ my $wr = Travel::Status::DE::DBWagenreihung->new(
);
for my $section ($wr->sections) {
- my $section_length = $section->{end_percent} - $section->{start_percent};
+ my $section_length = $section->length_percent;
my $spacing_left = int(($section_length - 2) / 2) - 1;
my $spacing_right = int(($section_length - 2) / 2);
@@ -43,7 +43,7 @@ for my $section ($wr->sections) {
printf("|%s%s%s|",
' ' x $spacing_left,
- $section->{name},
+ $section->name,
' ' x $spacing_right
);
}