From afbdc72dbdc5afc4acf677efc41ec6065f6f61c0 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 15 Aug 2011 00:06:57 +0200 Subject: DeutscheBahn.pm: Fix results initialization --- lib/Travel/Status/DE/DeutscheBahn.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/Travel/Status') diff --git a/lib/Travel/Status/DE/DeutscheBahn.pm b/lib/Travel/Status/DE/DeutscheBahn.pm index fd7fc35..ae541ce 100644 --- a/lib/Travel/Status/DE/DeutscheBahn.pm +++ b/lib/Travel/Status/DE/DeutscheBahn.pm @@ -46,7 +46,6 @@ sub new { start => 'Suchen', boardType => $conf{mode} // 'dep', }, - results => [], }; for my $i ( 0 .. @{ $ref->{mot_filter} } ) { @@ -129,6 +128,8 @@ sub results { return; } + $self->{results} = []; + for my $tr ( @{ $self->{tree}->findnodes($xp_element) } ) { my ($n_time) = $tr->findnodes($xp_time); -- cgit v1.2.3