summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm
index 73941c0..1fb4a26 100644
--- a/lib/DBInfoscreen/Controller/Stationboard.pm
+++ b/lib/DBInfoscreen/Controller/Stationboard.pm
@@ -105,7 +105,7 @@ sub hafas_json_req {
my ( $ua, $cache, $url ) = @_;
if ( my $content = $cache->thaw($url) ) {
- return decode_json( ${$content} );
+ return $content;
}
my $res = $ua->get($url)->result;
@@ -121,9 +121,11 @@ sub hafas_json_req {
$body =~ s{(}{(}g;
$body =~ s{)}{)}g;
- $cache->freeze( $url, \$body );
+ my $json = decode_json($body);
- return decode_json($body);
+ $cache->freeze( $url, $json );
+
+ return $json;
}
# quick&dirty, will be cleaned up later