diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-10-03 20:24:40 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-10-03 20:24:40 +0200 |
commit | 85b8fa9655490cb0a8a35c83f61d05bf6a355cf2 (patch) | |
tree | 7cb8856790c027fc1f913f23f01ed766ba1db53a /lib/Travel/Status/DE/EFA | |
parent | 4a8d1a097d75ac06bdab33cc421785b8598b0a84 (diff) |
perltidy
Diffstat (limited to 'lib/Travel/Status/DE/EFA')
-rw-r--r-- | lib/Travel/Status/DE/EFA/Trip.pm | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lib/Travel/Status/DE/EFA/Trip.pm b/lib/Travel/Status/DE/EFA/Trip.pm index acc83c4..e6c1b8e 100644 --- a/lib/Travel/Status/DE/EFA/Trip.pm +++ b/lib/Travel/Status/DE/EFA/Trip.pm @@ -12,7 +12,8 @@ use parent 'Class::Accessor'; our $VERSION = '3.01'; Travel::Status::DE::EFA::Trip->mk_ro_accessors( - qw(operator product product_class name line number type id dest_name dest_id)); + qw(operator product product_class name line number type id dest_name dest_id) +); sub new { my ( $obj, %conf ) = @_; @@ -20,18 +21,18 @@ sub new { my $json = $conf{json}{transportation}; my $ref = { - operator => $json->{operator}{name}, - product => $json->{product}{name}, + operator => $json->{operator}{name}, + product => $json->{product}{name}, product_class => $json->{product}{class}, - polyline => $json->{coords}, - name => $json->{name}, - line => $json->{disassembledName}, - number => $json->{properties}{trainNumber}, - type => $json->{properties}{trainType} // $json->{product}{name}, - id => $json->{id}, - dest_name => $json->{destination}{name}, - dest_id => $json->{destination}{id}, - route_raw => $json->{locationSequence}, + polyline => $json->{coords}, + name => $json->{name}, + line => $json->{disassembledName}, + number => $json->{properties}{trainNumber}, + type => $json->{properties}{trainType} // $json->{product}{name}, + id => $json->{id}, + dest_name => $json->{destination}{name}, + dest_id => $json->{destination}{id}, + route_raw => $json->{locationSequence}, strptime_obj => DateTime::Format::Strptime->new( pattern => '%Y-%m-%dT%H:%M:%SZ', time_zone => 'UTC' |