From 96ddb302c7f2ba094facdd7a69d41f57a29ffe17 Mon Sep 17 00:00:00 2001 From: erickson Date: Thu, 7 Oct 2010 12:57:56 +0000 Subject: [PATCH] in json encoder, replace 2 sub calls w/ 1 hash lookup in heavily called code path. we lose some abstraction, but it's probably worth it here git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2030 9efc2488-bf62-4759-914b-345cdb29e865 --- src/perl/lib/OpenSRF/Utils/JSON.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/perl/lib/OpenSRF/Utils/JSON.pm b/src/perl/lib/OpenSRF/Utils/JSON.pm index f7cf719..58a7a02 100644 --- a/src/perl/lib/OpenSRF/Utils/JSON.pm +++ b/src/perl/lib/OpenSRF/Utils/JSON.pm @@ -219,7 +219,7 @@ sub perl2JSONObject { } if($ref ne 'HASH' and $ref ne 'ARRAY') { - $ref = $pkg->lookup_hint($ref) if $pkg->lookup_hint($ref); + $ref = $_class_map{classes}{$ref}{hint} || $ref; $jsonobj = {$JSON_CLASS_KEY => $ref, $JSON_PAYLOAD_KEY => $jsonobj}; } -- 2.11.0