From 85b8fa9655490cb0a8a35c83f61d05bf6a355cf2 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Thu, 3 Oct 2024 20:24:40 +0200 Subject: perltidy --- lib/Travel/Status/DE/EFA/Trip.pm | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'lib/Travel/Status/DE/EFA') 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' -- cgit v1.2.3