1 # $Id: zoomtst1.pl,v 1.4 2006-11-02 17:48:26 mike Exp $
3 # See ../README for a description of this program.
4 # perl -I../../blib/lib -I../../blib/arch zoomtst1.pl <target> <query>
11 print STDERR "Usage: $0 target query\n";
12 print STDERR " eg. $0 z3950.indexdata.dk/gils computer\n";
15 my($host, $query) = @ARGV;
18 my $conn = new ZOOM::Connection($host, 0);
19 $conn->option(preferredRecordSyntax => "usmarc");
20 my $rs = $conn->search_pqf($query);
22 print "Query '$query' found $n records\n";
24 my $rec = $rs->record($i);
25 print "=== Record ", $i+1, " of $n ===\n";
32 die "Non-ZOOM error: $@" if !$@->isa("ZOOM::Exception");
33 print STDERR "Error ", $@->code(), ": ", $@->message();
34 print STDERR " (", $@->addinfo(), ")" if $@->addinfo();