Added explain handler. Input=DATABASE output=EXPLAIN
[simpleserver-moved-to-github.git] / SimpleServer.pm
index f870558..1dc36d2 100644 (file)
@@ -25,7 +25,7 @@
 ##
 ##
 
-## $Id: SimpleServer.pm,v 1.25 2006-04-19 12:38:49 mike Exp $
+## $Id: SimpleServer.pm,v 1.27 2006-06-02 16:03:25 quinn Exp $
 
 package Net::Z3950::SimpleServer;
 
@@ -83,6 +83,12 @@ sub launch_server {
        if (defined($self->{SCAN})) {
                set_scan_handler($self->{SCAN});
        }
+       if (defined($self->{SORT})) {
+               set_sort_handler($self->{SORT});
+       }
+       if (defined($self->{EXPLAIN})) {
+               set_explain_handler($self->{EXPLAIN});
+       }
 
        start_server(@args);
 }
@@ -209,7 +215,8 @@ means of the SimpleServer object constructor
                        SEARCH  =>      \&my_search_handler,
                        PRESENT =>      \&my_present_handler,
                        SCAN    =>      \&my_scan_handler,
-                       FETCH   =>      \&my_fetch_handler);
+                       FETCH   =>      \&my_fetch_handler,
+                       EXPLAIN =>      \&my_explain_handler);
 
 If you want your SimpleServer to start a thread (threaded mode) to
 handle each incoming Z39.50 request instead of forking a process