diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-07-18 17:34:17 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-07-18 17:34:17 +0200 |
commit | 53cf789f02f754f10650ce94e2b01997dda61a4d (patch) | |
tree | b2ff42190f7b497daabe5a8b7f80eea20d2d7b7c /lib/Travel/Status/DE | |
parent | 9a196c63438f37b116067dc93e5e16655e50f926 (diff) |
DeutscheBahn.pm: Make ->results work properly when used multiple times
Diffstat (limited to 'lib/Travel/Status/DE')
-rw-r--r-- | lib/Travel/Status/DE/DeutscheBahn.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/DeutscheBahn.pm b/lib/Travel/Status/DE/DeutscheBahn.pm index 46c3928..baf1fe2 100644 --- a/lib/Travel/Status/DE/DeutscheBahn.pm +++ b/lib/Travel/Status/DE/DeutscheBahn.pm @@ -113,6 +113,10 @@ sub results { \d{1,2}:\d{1,2} }mx; + if ( defined $self->{results} ) { + return @{ $self->{results} }; + } + for my $tr ( @{ $self->{tree}->findnodes($xp_element) } ) { my ($n_time) = $tr->findnodes($xp_time); |