diff options
author | Daniel Friesel <derf@finalrewind.org> | 2015-04-18 23:03:15 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2015-04-18 23:03:15 +0200 |
commit | d629ad663f6195287dd31f0204f9d3a163b0869c (patch) | |
tree | 0812c04d38ede3d9e56a8bab7a774947946069e1 /lib/Travel/Status/DE/IRIS | |
parent | ef40feb961f363029d98524b62a38a977823bb2b (diff) |
wing_id only uses two thirds of the train_id. now wing detection actually works.
Diffstat (limited to 'lib/Travel/Status/DE/IRIS')
-rw-r--r-- | lib/Travel/Status/DE/IRIS/Result.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Travel/Status/DE/IRIS/Result.pm b/lib/Travel/Status/DE/IRIS/Result.pm index e49750f..9b09c00 100644 --- a/lib/Travel/Status/DE/IRIS/Result.pm +++ b/lib/Travel/Status/DE/IRIS/Result.pm @@ -13,6 +13,7 @@ use DateTime; use DateTime::Format::Strptime; use List::Compare; use List::MoreUtils qw(none uniq firstval); +use Scalar::Util qw(weaken); our $VERSION = '0.08'; @@ -98,7 +99,7 @@ Travel::Status::DE::IRIS::Result->mk_ro_accessors( line_no train_no_transfer old_train_id old_train_no platform raw_id realtime_xml route_start route_end sched_arrival sched_departure sched_platform sched_route_start sched_route_end start stop_no time - train_id train_no transfer type unknown_t unknown_o) + train_id train_no transfer type unknown_t unknown_o wing_id) ); sub new { @@ -113,6 +114,7 @@ sub new { my ( $train_id, $start_ts, $stop_no ) = split( /.\K-/, $opt{raw_id} ); + $ref->{wing_id} = "${train_id}-${start_ts}"; $train_id =~ s{^-}{}; $ref->{start} = $strp->parse_datetime($start_ts); |