From: mike Date: Tue, 11 Apr 2006 16:29:50 +0000 (+0000) Subject: Nice shorter version! X-Git-Tag: cpan_1_22~192 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=9c8ffebe6900401c92311f88c5ddacd3fd4aaab6;p=ZOOM-Perl-moved-to-github.git Nice shorter version! --- diff --git a/samples/zoom/trivial-async.pl b/samples/zoom/trivial-async.pl index 6dcb41e..05f1185 100644 --- a/samples/zoom/trivial-async.pl +++ b/samples/zoom/trivial-async.pl @@ -1,13 +1,11 @@ use ZOOM; @targets = ('z3950.loc.gov:7090/Voyager', 'bagel.indexdata.com:210/gils'); -$o = new ZOOM::Options(); -$o->option(async => 1); # asynchronous mode -$o->option(count => 1); # piggyback retrieval count -$o->option(preferredRecordSyntax => "usmarc"); for ($i = 0; $i < @targets; $i++) { - $z[$i] = create ZOOM::Connection($o); - $z[$i]->connect($targets[$i]); + $z[$i] = new ZOOM::Connection($targets[$i], 0, + async => 1, # asynchronous mode + count => 1, # piggyback retrieval count + preferredRecordSyntax => "usmarc"); $r[$i] = $z[$i]->search_pqf("mineral"); } while (($i = ZOOM::event(\@z)) != 0) {