comparison fetch_weather.pl @ 417:3c42ad35e157

fetch_weather: Cosmetic.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 07 Jan 2017 23:25:57 +0200
parents c88f7449b526
children a17b7fdd03c0
comparison
equal deleted inserted replaced
416:c88f7449b526 417:3c42ad35e157
13 # Requires various Perl modules, in Debian the packages should be: 13 # Requires various Perl modules, in Debian the packages should be:
14 # libwww-perl libxml-simple-perl libtimedate-perl 14 # libwww-perl libxml-simple-perl libtimedate-perl
15 # 15 #
16 # 16 #
17 ########################################################################## 17 ##########################################################################
18 use 5.018; 18 use 5.18.0;
19 use strict; 19 use strict;
20 use warnings; 20 use warnings;
21 use utf8; 21 use utf8;
22 use LWP::UserAgent; 22 use LWP::UserAgent;
23 use HTTP::Message; 23 use HTTP::Message;
376 print STDERR "Using CACHED Tiehallinto static meta data from '$meta_file'.\n" if (opt_get_int("debug") > 0); 376 print STDERR "Using CACHED Tiehallinto static meta data from '$meta_file'.\n" if (opt_get_int("debug") > 0);
377 $meta_str = read_text($meta_file); 377 $meta_str = read_text($meta_file);
378 } 378 }
379 379
380 print STDERR "Is meta_str UTF8? ".(utf8::is_utf8($meta_str) ? "yes" : "NO!")."\n" if (opt_get_int("debug") > 0); 380 print STDERR "Is meta_str UTF8? ".(utf8::is_utf8($meta_str) ? "yes" : "NO!")."\n" if (opt_get_int("debug") > 0);
381
382 381
383 # Parse the data .. 382 # Parse the data ..
384 my $meta_data = {}; 383 my $meta_data = {};
385 my $json = JSON->new->decode($meta_str); 384 my $json = JSON->new->decode($meta_str);
386 385