summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2016-05-11 13:21:48 (GMT)
committerChristian Pointner <equinox@spreadspace.org>2016-05-11 13:21:48 (GMT)
commitd3a58ca8d580d55e6ea1e6b7bab155b8855337d5 (patch)
tree240bb3c36c38614c159b20dd3796afc538d5bd04
parent47d2fa25c11d5b99d8f2f5dde01b78b151374799 (diff)
moved to JSON::MaybeXS
-rw-r--r--Makefile.PL2
-rw-r--r--debian/control3
-rwxr-xr-xlib/RHRD/utils.pm5
3 files changed, 6 insertions, 4 deletions
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");