From 3cb0958be52c5c484a8a0dc7a15711bb40caa518 Mon Sep 17 00:00:00 2001 From: miker Date: Mon, 7 Mar 2005 14:26:25 +0000 Subject: [PATCH] fixing JSON bug with top level non-casted hashrefs git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@184 9efc2488-bf62-4759-914b-345cdb29e865 --- src/perlmods/JSON.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/perlmods/JSON.pm b/src/perlmods/JSON.pm index d927a78..4d21429 100644 --- a/src/perlmods/JSON.pm +++ b/src/perlmods/JSON.pm @@ -96,8 +96,8 @@ sub JSON2perl { s/true/ bless( {}, "JSON::bool::true") /sog; s/false/ bless( {}, "JSON::bool::false") /sog; - - return eval $_; + my $ret; + return eval '$ret = '.$_; } sub old_JSON2perl { -- 2.11.0