From: miker Date: Tue, 8 Mar 2005 22:14:26 +0000 (+0000) Subject: removing C++ comments, cause they hate me X-Git-Tag: osrf_rel_2_0_1~1668 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f384f367b97942faf5624f378467889bb2b7ee1e;p=OpenSRF.git removing C++ comments, cause they hate me git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@204 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/perlmods/JSON.pm b/src/perlmods/JSON.pm index 6027c92..0d99806 100644 --- a/src/perlmods/JSON.pm +++ b/src/perlmods/JSON.pm @@ -81,12 +81,11 @@ sub JSON2perl { my $class = shift; local $_ = shift; - # remove C++ comments - s/\/\/.+$//sgmo; - # Convert JSON Unicode... s/\\u(\d{4})/chr(hex($1))/esog; + warn $_; + # Grab strings... my @strings = /"((?:(?:\\[\"])|[^\"])*)"/sog; @@ -108,6 +107,7 @@ sub JSON2perl { s/true/ bless( {}, "JSON::bool::true") /sog; s/false/ bless( {}, "JSON::bool::false") /sog; + my $ret; return eval '$ret = '.$_; }