summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/VRR.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2013-09-18 21:17:56 +0200
committerDaniel Friesel <derf@finalrewind.org>2013-09-18 21:17:56 +0200
commit0c6b8879c3c91bb2708e0f03f7d1641f760a6624 (patch)
tree7a033329db979e938cfe217cd12f2628a69d6ade /lib/Travel/Status/DE/VRR.pm
parentba3500bdc9a5bb180f2aab99b0da73b55c569c5f (diff)
Add Line->key and JSON export
Diffstat (limited to 'lib/Travel/Status/DE/VRR.pm')
-rw-r--r--lib/Travel/Status/DE/VRR.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/VRR.pm b/lib/Travel/Status/DE/VRR.pm
index 20a9ca2..89e9843 100644
--- a/lib/Travel/Status/DE/VRR.pm
+++ b/lib/Travel/Status/DE/VRR.pm
@@ -113,6 +113,8 @@ sub new {
$self->{tree} = XML::LibXML->load_xml( string => $self->{xml}, );
+ # say $self->{tree}->toString(1);
+
$self->check_for_ambiguous();
return $self;
@@ -313,6 +315,7 @@ sub results {
my $line = $e_line->getAttribute('number');
my $dest = $e_line->getAttribute('direction');
my $info = $e_info->textContent;
+ my $key = $e_line->getAttribute('key');
my $countdown = $e->getAttribute('countdown');
my $delay = $e_info->getAttribute('delay') // 0;
my $type = $e_info->getAttribute('name');
@@ -334,6 +337,7 @@ sub results {
time => $rtime,
platform => $platform,
platform_db => $platform_is_db,
+ key => $key,
lineref => $line_obj[0] // undef,
line => $line,
destination => decode( 'UTF-8', $dest ),