From: miker Date: Mon, 7 Mar 2005 14:26:25 +0000 (+0000) Subject: fixing JSON bug with top level non-casted hashrefs X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3cb0958be52c5c484a8a0dc7a15711bb40caa518;p=opensrf%2Fbjwebb.git 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 --- 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 {