added lookup_class and lookup_hint methods to support param class instance checking
authormiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 19 Jan 2006 04:53:31 +0000 (04:53 +0000)
committermiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 19 Jan 2006 04:53:31 +0000 (04:53 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@621 9efc2488-bf62-4759-914b-345cdb29e865

src/perlmods/JSON.pm

index 882b024..95ecf6c 100644 (file)
@@ -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;