[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdesrc-build] modules/ksb/Updater: Manually use JSON::PP instead of requiring JSON.
From:       Michael Pyne <mpyne () kde ! org>
Date:       2015-12-31 4:22:37
Message-ID: E1aEUl3-0000JM-2Y () scm ! kde ! org
[Download RAW message or body]

Git commit d05afb553886744a6e8bf67e3fb66daec5e088c1 by Michael Pyne.
Committed on 31/12/2015 at 04:21.
Pushed by mpyne into branch 'master'.

Manually use JSON::PP instead of requiring JSON.

JSON::PP is included in core Perl so one less dependency to look after,
and it's fast enough (for what we need) that there's really no point to
making it possible to look for JSON::XS.

M  +1    -4    modules/ksb/Updater/KDEProjectMetadata.pm

http://commits.kde.org/kdesrc-build/d05afb553886744a6e8bf67e3fb66daec5e088c1


diff --git a/modules/ksb/Updater/KDEProjectMetadata.pm \
b/modules/ksb/Updater/KDEProjectMetadata.pm index e0eaea0..ff6f98c 100644
--- a/modules/ksb/Updater/KDEProjectMetadata.pm
+++ b/modules/ksb/Updater/KDEProjectMetadata.pm
@@ -15,7 +15,7 @@ use ksb::Updater::KDEProject;
 
 our @ISA = qw(ksb::Updater::KDEProject);
 
-my $haveJson = eval { require JSON; JSON->import(); 1; };
+use JSON::PP;
 
 sub name
 {
@@ -52,9 +52,6 @@ sub logicalModuleGroups
     my $self = shift;
     my $path = $self->module()->fullpath('source') . \
"/logical-module-structure";  
-    croak_runtime("Logical module groups require the Perl JSON module")
-        unless $haveJson;
-
     my $fh = pretend_open($path) or
         croak_internal("Unable to read logical module structure: $!");
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic