From: miker Date: Mon, 7 Mar 2005 17:52:20 +0000 (+0000) Subject: using old regex method + default class X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f82c78e838fa756db566cf136d48fc538aaf0b56;p=opensrf%2Fbjwebb.git using old regex method + default class git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@191 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/perlmods/JSON.pm b/src/perlmods/JSON.pm index d84ad0b..9e6db46 100644 --- a/src/perlmods/JSON.pm +++ b/src/perlmods/JSON.pm @@ -91,11 +91,12 @@ sub JSON2perl { s/:/ => /sog; - if (0) { + if (1) { # handle class blessings s/\/\*--\s*S\w*?\s+\S+\s*--\*\// bless(/sog; s/\/\*--\s*E\w*?\s+(\S+)\s*--\*\// => _json_hint_to_class("$1")) /sog; } else { + #why don't I work?!?! my $string = $_; for my $hint (values %{$_class_map{hints}}) { $string =~ s/\/\*--\s*S\w*?\s+$$hint{hint_re}\s*--\*\// bless(/sog;