From 1f28e0d5194b4671c1192a09f948d973608b3628 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 2 Jan 2019 14:50:21 +0100 Subject: show wagon model / series --- lib/Travel/Status/DE/DBWagenreihung/Wagon.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Travel/Status/DE/DBWagenreihung/Wagon.pm b/lib/Travel/Status/DE/DBWagenreihung/Wagon.pm index f25e85c..5c2957e 100644 --- a/lib/Travel/Status/DE/DBWagenreihung/Wagon.pm +++ b/lib/Travel/Status/DE/DBWagenreihung/Wagon.pm @@ -13,7 +13,7 @@ our $VERSION = '0.00'; Travel::Status::DE::DBWagenreihung::Wagon->mk_ro_accessors( qw(attributes class_type has_ac has_accessibility has_bistro has_compartments has_multipurpose is_dosto is_interregio is_locomotive is_powercar number - section type) + model section type) ); sub new { @@ -25,9 +25,12 @@ sub new { $ref->{is_locomotive} = 0; $ref->{is_powercar} = 0; $ref->{number} = $opt{wagenordnungsnummer}; + $ref->{model} = $opt{fahrzeugnummer}; $ref->{section} = $opt{fahrzeugsektor}; $ref->{type} = $opt{fahrzeugtyp}; + $ref->{model} =~ s{^.....(...)....$}{$1}; + my $self = bless( $ref, $obj ); $self->parse_type; -- cgit v1.2.3