From: Frédéric Buclin Date: Thu, 5 Jan 2012 00:49:15 +0000 (+0100) Subject: Bug 706753: Bugzilla will not work with newest version of JSON::RPC 1.01 due to non... X-Git-Tag: bugzilla-3.6.8~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fed5fee51e3fe5597d547576c4a560ac1d0e10e8;p=thirdparty%2Fbugzilla.git Bug 706753: Bugzilla will not work with newest version of JSON::RPC 1.01 due to non-backward compatibility r=dkl r=mkanat a=LpSolit --- diff --git a/Bugzilla/WebService/Server/JSONRPC.pm b/Bugzilla/WebService/Server/JSONRPC.pm index 3ec64c6bc9..096cecfbf9 100644 --- a/Bugzilla/WebService/Server/JSONRPC.pm +++ b/Bugzilla/WebService/Server/JSONRPC.pm @@ -22,7 +22,18 @@ package Bugzilla::WebService::Server::JSONRPC; use strict; -use base qw(JSON::RPC::Server::CGI Bugzilla::WebService::Server); +use Bugzilla::WebService::Server; +BEGIN { + our @ISA = qw(Bugzilla::WebService::Server); + + if (eval { require JSON::RPC::Server::CGI }) { + unshift(@ISA, 'JSON::RPC::Server::CGI'); + } + else { + require JSON::RPC::Legacy::Server::CGI; + unshift(@ISA, 'JSON::RPC::Legacy::Server::CGI'); + } +} use Bugzilla::Error; use Bugzilla::WebService::Constants;