summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/VRR.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-09-11 13:17:12 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-09-11 13:17:12 +0200
commit43f83fc7df3a563521af01dd1251ddd8e8d21d3a (patch)
tree7838ef7fdf5f682d2fc8e75f0134d0da649a6dc9 /lib/Travel/Status/DE/VRR.pm
parentcddc688b8152407f53916268a41304c01d137e87 (diff)
Add initial support for additional departure information
Diffstat (limited to 'lib/Travel/Status/DE/VRR.pm')
-rw-r--r--lib/Travel/Status/DE/VRR.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Travel/Status/DE/VRR.pm b/lib/Travel/Status/DE/VRR.pm
index ae1ef44..3a7375d 100644
--- a/lib/Travel/Status/DE/VRR.pm
+++ b/lib/Travel/Status/DE/VRR.pm
@@ -94,14 +94,16 @@ sub results {
[ 'platform', './td[3]' ],
[ 'line', './td[5]' ],
[ 'dest', './td[7]' ],
+ [ 'info', './td[9]' ],
);
@parts = map { [ $_->[0], XML::LibXML::XPathExpression->new( $_->[1] ) ] }
@parts;
for my $tr ( $self->{tree}->findnodes($xp_element) ) {
- my ( $time, $platform, $line, $dest )
+ my ( $time, $platform, $line, $dest, $info )
= map { ( $tr->findnodes( $_->[1] ) )[0]->textContent } @parts;
+
push(
@results,
Travel::Status::DE::VRR::Result->new(
@@ -109,6 +111,7 @@ sub results {
platform => $platform,
line => $line,
destination => $dest,
+ info => $info,
)
);
}