From bba7d1356b251275f4a89d538115be17b165623a Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 9 Feb 2013 23:34:38 +0100 Subject: replace '+x' lines by 'Verspätung ca. x Minuten' (as in reality) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cgi/index.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cgi/index.pl b/cgi/index.pl index 1b49e98..6fdfcb8 100644 --- a/cgi/index.pl +++ b/cgi/index.pl @@ -81,9 +81,12 @@ sub handle_request { } my $info = $result->info; - if ($info eq '+0') { + if ( $info eq '+0' ) { $info = undef; } + if ( $info and $info =~ m{ ^ \+ (\d+) $ }ox ) { + $info = "Verspaetung ca. $1 Minuten"; + } push( @departures, { @@ -114,7 +117,7 @@ get '/_redirect' => sub { $params->remove('station'); $params->remove('via'); - if ($params->param('mode') and $params->param('mode') eq 'multi') { + if ( $params->param('mode') and $params->param('mode') eq 'multi' ) { $params->remove('mode'); } -- cgit v1.2.3