Loading cgi/index.pl +15 −9 Original line number Diff line number Diff line Loading @@ -16,8 +16,8 @@ sub get_results_for { my $results = $cache->thaw($station); if ( not $results ) { my $status = Travel::Status::DE::DeutscheBahn->new( station => $station ); my $status = Travel::Status::DE::DeutscheBahn->new( station => $station ); $results = [ $status->results ]; $cache->freeze( $station, $results ); } Loading @@ -43,8 +43,14 @@ get '/multi/:station' => sub { filename => dist_file( 'db-fakedisplay', 'multi-lcd.html' ), loop_context_vars => 1, ); my @results = get_results_for($station); if ( not @results ) { $self->render( 'index', error => "Got no results for '$station'", ); return; } for my $result ( get_results_for($station) ) { for my $result (@results) { push( @params, { Loading @@ -68,7 +74,7 @@ __DATA__ @@ index.html.ep % title 'DB Fakedisplay'; <% if (my $error = flash 'error' ) { %> <% if (my $error = stash 'error') { %> Error: <%= $error %><br/> <% } %> <%= form_for index => begin %> Loading Loading
cgi/index.pl +15 −9 Original line number Diff line number Diff line Loading @@ -16,8 +16,8 @@ sub get_results_for { my $results = $cache->thaw($station); if ( not $results ) { my $status = Travel::Status::DE::DeutscheBahn->new( station => $station ); my $status = Travel::Status::DE::DeutscheBahn->new( station => $station ); $results = [ $status->results ]; $cache->freeze( $station, $results ); } Loading @@ -43,8 +43,14 @@ get '/multi/:station' => sub { filename => dist_file( 'db-fakedisplay', 'multi-lcd.html' ), loop_context_vars => 1, ); my @results = get_results_for($station); if ( not @results ) { $self->render( 'index', error => "Got no results for '$station'", ); return; } for my $result ( get_results_for($station) ) { for my $result (@results) { push( @params, { Loading @@ -68,7 +74,7 @@ __DATA__ @@ index.html.ep % title 'DB Fakedisplay'; <% if (my $error = flash 'error' ) { %> <% if (my $error = stash 'error') { %> Error: <%= $error %><br/> <% } %> <%= form_for index => begin %> Loading