diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-01-02 14:50:21 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-01-02 14:50:21 +0100 |
commit | 1f28e0d5194b4671c1192a09f948d973608b3628 (patch) | |
tree | c177d6976948b09db1157c7c3e57a0de632a31d4 /lib/Travel/Status/DE | |
parent | 64af46a2ebc0ad096946bb33c54056b686846cce (diff) |
show wagon model / series
Diffstat (limited to 'lib/Travel/Status/DE')
-rw-r--r-- | lib/Travel/Status/DE/DBWagenreihung/Wagon.pm | 5 |
1 files changed, 4 insertions, 1 deletions
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; |