From d3a58ca8d580d55e6ea1e6b7bab155b8855337d5 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 11 May 2016 15:21:48 +0200 Subject: moved to JSON::MaybeXS diff --git a/Makefile.PL b/Makefile.PL index b5f7244..99be55e 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -17,7 +17,7 @@ WriteMakefile( "DateTime::TimeZone" => 0, "DateTime::Format::Strptime" => 0, "Date::Calc" => 0, - "JSON::Any" => 0, + "JSON::MaybeXS" => 0, "URI" => 0, "URI::Fetch" => 0, "LWP" => 0 diff --git a/debian/control b/debian/control index 9a0a748..f7bfe60 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.9.6 Package: librhrd-perl Architecture: all -Depends: ${misc:Depends}, ${perl:Depends}, libconfig-inifiles-perl, libdbi-perl, libdbd-mysql-perl, libdate-calc-perl, libdatetime-perl, libdatetime-timezone-perl, libdatetime-format-strptime-perl, libjson-any-perl, liburi-perl, liburi-fetch-perl, libwww-perl +Depends: ${misc:Depends}, ${perl:Depends}, libconfig-inifiles-perl, libdbi-perl, libdbd-mysql-perl, libdate-calc-perl, libdatetime-perl, libdatetime-timezone-perl, libdatetime-format-strptime-perl, libjson-maybexs-perl, liburi-perl, liburi-fetch-perl, libwww-perl Description: Radio Helsinki Rivendell Perl Modules These modules are used by rhwebimport, rhimport as well by some other scripts. @@ -25,3 +25,4 @@ Description: Radio Helsinki Rivendell Utilities * rhrd-show * rhrd-user * rhrd-sanity-check + * rhrd-schedules diff --git a/lib/RHRD/utils.pm b/lib/RHRD/utils.pm index 3835851..13e8ca1 100755 --- a/lib/RHRD/utils.pm +++ b/lib/RHRD/utils.pm @@ -28,7 +28,7 @@ use DateTime; use DateTime::TimeZone; use LWP::Simple; use URI::Fetch; -use JSON; +use JSON::MaybeXS; sub get_rd_week { @@ -178,7 +178,8 @@ sub fetch_parse_json my $json = $res->content; my $data; eval { - $data = from_json($json); + my $j = JSON::MaybeXS->new(utf8 => 0); + $data = $j->decode($json); 1; } or do { return (0, "error parsing import result"); -- cgit v0.10.2