allow packages other then the explicitly named application_implementation to publish...
authormiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 1 Mar 2005 20:40:51 +0000 (20:40 +0000)
committermiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 1 Mar 2005 20:40:51 +0000 (20:40 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@132 9efc2488-bf62-4759-914b-345cdb29e865

src/perlmods/OpenSRF/Application.pm

index 0205c2f..cef8e6e 100644 (file)
@@ -218,9 +218,12 @@ sub register_method {
        $args{stream} ||= 0;
        $args{remote} ||= 0;
        $args{package} = $app;                
+       $args{object_hint} ||= '';                
        $args{server_class} = server_class();
        $args{api_name} ||= $args{server_class} . '.' . $args{method};
 
+       JSON->register_class_hint( name => $args{package}, hint => $args{object_hint}, type => "hash" );
+
        $_METHODS[$args{api_level}]{$args{api_name}} = bless \%args => $app;
 
        __PACKAGE__->register_method(