From 9a07392b923b5811e048f976f42d308dbafa8ade Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 19 Nov 2011 21:17:30 +0100 Subject: Parse lines without routeDescText --- lib/Travel/Status/DE/VRR.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/Travel/Status/DE/VRR.pm b/lib/Travel/Status/DE/VRR.pm index dd149e8..3fe437f 100644 --- a/lib/Travel/Status/DE/VRR.pm +++ b/lib/Travel/Status/DE/VRR.pm @@ -168,8 +168,9 @@ sub lines { my $e_route = ( $e->findnodes($xp_route) )[0]; my $e_oper = ( $e->findnodes($xp_oper) )[0]; - if ( not( $e_info and $e_route and $e_oper ) ) { - cluck('node with insufficient data. This should not happen'); + if ( not( $e_info and $e_oper ) ) { + cluck( 'node with insufficient data. This should not happen. ' + . $e->getAttribute('number') ); next; } @@ -177,7 +178,7 @@ sub lines { my $direction = $e->getAttribute('direction'); my $valid = $e->getAttribute('valid'); my $type = $e_info->getAttribute('name'); - my $route = $e_route->textContent; + my $route = ( $e_route ? $e_route->textContent : undef ); my $operator = $e_oper->textContent; my $identifier = $e->getAttribute('stateless'); -- cgit v1.2.3