Mercurial > hg > egg-tcls
changeset 401:9ffce5c1ba99
fetch_weather: Stop using binmode -> utf8 in File::Slurp method calls, it seems to be deprecated at some deeper level.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 06 Jan 2017 15:12:52 +0200 |
parents | f69aff75d1e2 |
children | eaf56c84dc8c |
files | fetch_weather.pl |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/fetch_weather.pl Fri Jan 06 15:05:35 2017 +0200 +++ b/fetch_weather.pl Fri Jan 06 15:12:52 2017 +0200 @@ -26,7 +26,7 @@ use Date::Format; use Date::Parse; use Data::Dumper; -use File::Slurp; +use File::Slurp::Unicode; use Text::CSV; @@ -285,7 +285,7 @@ ### if (opt_chk_valid("outfile", 1)) { - my $str = read_file(opt_get("outfile"), binmode => ':utf8', err_mode => 'quiet'); + my $str = read_file(opt_get("outfile"), err_mode => 'quiet'); if (defined($str)) { foreach my $line (split(/\s*\n\s*/, $str)) @@ -345,12 +345,12 @@ print STDERR "Storing to cache '$meta_file'.\n" if (opt_get_int("debug") > 0); $meta_str = $res->decoded_content; - write_file($meta_file, {binmode => ':utf8'}, $meta_str); + write_file($meta_file, $meta_str); } else { print STDERR "Using CACHED Tiehallinto static meta data from '$meta_file'.\n" if (opt_get_int("debug") > 0); - $meta_str = read_file($meta_file, binmode => ':utf8'); + $meta_str = read_file($meta_file); } # Parse the data ..