Bug#803315: debsnap: use JSON::PP
RjY
rjy at users.sourceforge.net
Wed Oct 28 17:23:50 UTC 2015
Package: devscripts
Version: 2.15.9
Severity: wishlist
Tags: patch
debsnap seems to work perfectly well with JSON::PP, part of perl core
since 5.14, according to its manual page. So it might be nice to use it
instead of requiring the extra dependency? I think running a bit slower
(by using pure perl JSON implementation instead of optimized C one) is
preferable to not running at all :)
---8<---
--- /usr/bin/debsnap 2015-10-06 02:29:12.000000000 +0100
+++ ./debsnap 2015-10-28 16:54:21.239450648 +0000
@@ -42,7 +42,7 @@
}
eval {
- require JSON;
+ require JSON::PP;
};
if ($@) {
if ($@ =~ m/Can\'t locate JSON/) {
@@ -114,7 +114,7 @@
verbose "Getting json $json_url\n";
my $content = LWP::Simple::get($json_url);
return unless defined $content;
- my $json = JSON->new();
+ my $json = JSON::PP->new();
# these are some nice json options to relax restrictions a bit:
my $json_text = $json->allow_nonref->utf8->relaxed->decode($content);
--->8---
--
http://rjy.org.uk/
More information about the devscripts-devel
mailing list