X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=ztest.pl;h=c879071e55b11e330f710a895cab5f25a4c73d7d;hb=2edffd526d9e0ced8031fb5e3fcb658b93a69b39;hp=62a579f49d6c5fa21141bd48a60e383df89c9c55;hpb=b5817b7f59ccfdc2fdad49e916dea95155b23867;p=simpleserver-moved-to-github.git diff --git a/ztest.pl b/ztest.pl index 62a579f..c879071 100755 --- a/ztest.pl +++ b/ztest.pl @@ -5,6 +5,17 @@ use Net::Z3950::SimpleServer; use Net::Z3950::OID; use strict; + +sub dump_hash { + my $href = shift; + my $key; + + foreach $key (keys %$href) { + printf("%10s => %s\n", $key, $href->{$key}); + } +} + + sub my_init_handler { my $args = shift; my $session = {}; @@ -35,7 +46,7 @@ sub my_search_handler { my $set_id = $args->{SETNAME}; my @database_list = @{ $args->{DATABASES} }; my $query = $args->{QUERY}; - my $hits = 2; + my $hits = 3; print "------------------------------------------------------------\n"; print "Processing query : $query\n"; @@ -61,7 +72,6 @@ sub my_fetch_handler { my $href = $data->[$offset - 1]; $args->{REP_FORM} = Net::Z3950::OID::xml; - foreach $field (keys %$href) { $record .= "<" . $field . ">" . $href->{$field} . ""; }