New
[irspy-moved-to-github.git] / test-pod.pl
1 #!/usr/bin/perl -w
2
3 # $Id: test-pod.pl,v 1.1 2006-05-05 22:14:46 mike Exp $
4
5 use strict;
6 use warnings;
7
8 use ZOOM::Pod;
9
10 my $pod = new ZOOM::Pod("bagel.indexdata.com/gils",
11                         "z3950.loc.gov:7090/Voyager");
12 $pod->callback(ZOOM::Event::RECV_SEARCH, \&show_result);
13 $pod->search_pqf("mineral");
14 my $err = $pod->wait();
15 print "failed with error $err" if $err;
16
17 sub show_result {
18     my($conn, $rs, $event) = @_;
19     print $conn->option("host"), ": found ", $rs->size(), " records\n";
20     return 0;
21 }