Handling complex compspec in present/fetch (slightly) better
[simpleserver-moved-to-github.git] / ztest.pl
index f3d3025..55587ec 100755 (executable)
--- a/ztest.pl
+++ b/ztest.pl
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 
-##  $Id: ztest.pl,v 1.13 2004-05-28 20:27:16 sondberg Exp $
+##  $Id: ztest.pl,v 1.15 2006-04-19 13:17:52 sondberg Exp $
 ##  ------------------------------------------------------------------
 ##
 ##  Copyright (c) 2000-2004, Index Data.
@@ -29,6 +29,7 @@
 ##
 
 use ExtUtils::testlib;
+use Data::Dumper;
 use Net::Z3950::SimpleServer;
 use Net::Z3950::OID;
 use strict;
@@ -58,6 +59,14 @@ sub my_init_handler {
            
 }
 
+
+sub my_sort_handler {
+    my ($args) = @_;
+
+    print "Sort handler called\n";
+    print Dumper( $args );
+}
+
 sub my_scan_handler {
        my $args = shift;
        my $term = $args->{TERM};
@@ -148,11 +157,13 @@ sub my_fetch_handler {
        }
 }
 
+Net::Z3950::SimpleServer::yazlog("hello");
 
 my $handler = new Net::Z3950::SimpleServer( 
                INIT    =>      "main::my_init_handler",
                SEARCH  =>      "main::my_search_handler",
                SCAN    =>      "main::my_scan_handler",
+                SORT    =>      "main::my_sort_handler",
                FETCH   =>      "main::my_fetch_handler" );
 
 $handler->launch_server("ztest.pl", @ARGV);