Commit 53cf789f authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

DeutscheBahn.pm: Make ->results work properly when used multiple times

parent 9a196c63
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
git HEAD

    [Travel::Status::DE::DeutscheBahn]
    * Fix ->results returning duplicate connections when accessed more than
      one time

Travel::Status::DE::DeutscheBahn 0.04 - Wed Jul 13 2011

    [Travel::Status::DE::DeutscheBahn::Result]
+4 −0
Original line number Diff line number Diff line
@@ -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);