From 22ba4cea82444cfaab55ba4b787d909d9ac2d307 Mon Sep 17 00:00:00 2001 From: mike Date: Wed, 12 Oct 2005 14:35:23 +0000 Subject: [PATCH] Explicitly print number of records found. --- samples/net-z3950-zoom/zoomtst1.pl | 4 +++- samples/net-z3950/zoomtst1.pl | 3 ++- samples/zoom/zoomtst1.pl | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/samples/net-z3950-zoom/zoomtst1.pl b/samples/net-z3950-zoom/zoomtst1.pl index 08b472a..a08cd89 100644 --- a/samples/net-z3950-zoom/zoomtst1.pl +++ b/samples/net-z3950-zoom/zoomtst1.pl @@ -1,4 +1,4 @@ -# $Id: zoomtst1.pl,v 1.1 2005-10-12 11:53:11 mike Exp $ +# $Id: zoomtst1.pl,v 1.2 2005-10-12 14:35:58 mike Exp $ # # See ../README for a description of this program. # perl -I../../blib/lib -I../../blib/arch zoomtst1.pl @@ -32,6 +32,8 @@ die("Can't search for '$query': ", if $errcode != 0; my $n = Net::Z3950::ZOOM::resultset_size($rs); +print "Query '$query' found $n records\n"; + for my $i (0..$n-1) { my $rec = Net::Z3950::ZOOM::resultset_record($rs, $i); print "=== Record ", $i+1, " of $n ===\n"; diff --git a/samples/net-z3950/zoomtst1.pl b/samples/net-z3950/zoomtst1.pl index 0d9033c..0c793a3 100644 --- a/samples/net-z3950/zoomtst1.pl +++ b/samples/net-z3950/zoomtst1.pl @@ -1,4 +1,4 @@ -# $Id: zoomtst1.pl,v 1.1 2005-10-12 11:53:00 mike Exp $ +# $Id: zoomtst1.pl,v 1.2 2005-10-12 14:35:46 mike Exp $ # # See ../README for a description of this program. # perl -I../../blib/lib -I../../blib/arch zoomtst1.pl @@ -30,6 +30,7 @@ $conn->option(elementSetName => "F"); my $rs = $conn->search(-prefix => $query) or die "can't search for '$query': ", $conn->errmsg(); my $n = $rs->size(); +print "Query '$query' found $n records\n"; ### Note that the record-index is 1-based here, 0-based in ZOOM-C for my $i (1..$n) { diff --git a/samples/zoom/zoomtst1.pl b/samples/zoom/zoomtst1.pl index a1a1ffd..01f9bd5 100644 --- a/samples/zoom/zoomtst1.pl +++ b/samples/zoom/zoomtst1.pl @@ -1,4 +1,4 @@ -# $Id: zoomtst1.pl,v 1.2 2005-10-12 13:44:05 mike Exp $ +# $Id: zoomtst1.pl,v 1.3 2005-10-12 14:35:23 mike Exp $ # # See ../README for a description of this program. # perl -I../../blib/lib -I../../blib/arch zoomtst1.pl @@ -19,6 +19,7 @@ eval { $conn->option(preferredRecordSyntax => "usmarc"); my $rs = $conn->search_pqf($query); my $n = $rs->size(); + print "Query '$query' found $n records\n"; for my $i (0..$n-1) { my $rec = $rs->record($i); print "=== Record ", $i+1, " of $n ===\n"; -- 1.7.10.4