From 0c6b8879c3c91bb2708e0f03f7d1641f760a6624 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 18 Sep 2013 21:17:56 +0200 Subject: Add Line->key and JSON export --- lib/Travel/Status/DE/VRR.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/Travel/Status/DE/VRR.pm') 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 ), -- cgit v1.2.3