From d1ac410f58bb30257d21a3c4fe091146194ccdfc Mon Sep 17 00:00:00 2001
From: Dominic Hargreaves <dom@earth.li>
Date: Sun, 9 Sep 2018 21:35:08 +0100
Subject: Force the use of Cpanel::JSON::XS

JSON::XS breaks RT due to the removed from_json/to_json methods and JSON.pm
prefers JSON::XS to our preferred implementation Cpanel::JSON::XS by
default.

Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848041
Patch-Name: use_cpanel_json_xs.diff
Forwarded: not-needed
---
 lib/RT/Interface/Web.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index 7606022c..057e741d 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -64,6 +64,10 @@ use 5.010;
 
 package RT::Interface::Web;
 
+# Debian modification; see
+# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848041
+BEGIN { $ENV{PERL_JSON_BACKEND}='Cpanel::JSON::XS'; }
+
 use RT::SavedSearches;
 use RT::CustomRoles;
 use URI qw();
