From: miker Date: Thu, 19 Jan 2006 04:53:31 +0000 (+0000) Subject: added lookup_class and lookup_hint methods to support param class instance checking X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f05f22fdfcfd2f81301925ba17ae3c0e93f424b2;p=opensrf%2Fbjwebb.git added lookup_class and lookup_hint methods to support param class instance checking git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@621 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/perlmods/JSON.pm b/src/perlmods/JSON.pm index 882b024..95ecf6c 100644 --- a/src/perlmods/JSON.pm +++ b/src/perlmods/JSON.pm @@ -59,6 +59,18 @@ sub _JSON_regex { return ($string,$1); } +sub lookup_class { + my $self = shift; + my $hint = shift; + return $_class_map{hints}{$hint}{name} +} + +sub lookup_hint { + my $self = shift; + my $class = shift; + return $_class_map{classes}{$class}{hint} +} + sub _json_hint_to_class { my $type = shift; my $hint = shift;