From e0845072109fce647b5b61076f8bba978d3adf65 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 7 Oct 2015 18:29:12 +0200 Subject: route_interesting support in aseag-m --- lib/Travel/Status/DE/URA/Result.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/Travel/Status/DE') diff --git a/lib/Travel/Status/DE/URA/Result.pm b/lib/Travel/Status/DE/URA/Result.pm index fe6b75e..f59ba8e 100644 --- a/lib/Travel/Status/DE/URA/Result.pm +++ b/lib/Travel/Status/DE/URA/Result.pm @@ -59,14 +59,14 @@ sub type { sub route_interesting { my ( $self, $max_parts ) = @_; - my @via = map { $_->[1] } @{ $self->{route_timetable} }; + my @via = map { $_->[1] } @{ $self->{route_post} }; my ( @via_main, @via_show, $last_stop ); $max_parts //= 3; for my $stop (@via) { if ( - $stop->name_suf =~ m{ bf | hbf | Flughafen | bahnhof + $stop =~ m{ bf | hbf | Flughafen | bahnhof | Krankenhaus | Klinik | bushof | busstation }iox ) { @@ -75,14 +75,14 @@ sub route_interesting { } $last_stop = pop(@via); - if ( @via_main and $via_main[-1] == $last_stop ) { + if ( @via_main and $via_main[-1] eq $last_stop ) { pop(@via_main); } - if ( @via and $via[-1] == $last_stop ) { + if ( @via and $via[-1] eq $last_stop ) { pop(@via); } - if ( @via_main and @via and $via[0] == $via_main[0] ) { + if ( @via_main and @via and $via[0] eq $via_main[0] ) { shift(@via_main); } -- cgit v1.2.3