From: Mike Taylor Date: Fri, 23 Feb 2007 15:03:44 +0000 (+0000) Subject: Use ZEND only for callbacks, rather than RECV_* X-Git-Tag: CPAN-v1.02~601 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=4404b40258aa7c44a9126e56098f3b8459b69a96;p=irspy-moved-to-github.git Use ZEND only for callbacks, rather than RECV_* --- diff --git a/lib/ZOOM/IRSpy/Test/Ping.pm b/lib/ZOOM/IRSpy/Test/Ping.pm index 6186c62..09e6781 100644 --- a/lib/ZOOM/IRSpy/Test/Ping.pm +++ b/lib/ZOOM/IRSpy/Test/Ping.pm @@ -1,4 +1,4 @@ -# $Id: Ping.pm,v 1.19 2007-01-20 09:53:40 mike Exp $ +# $Id: Ping.pm,v 1.20 2007-02-23 15:03:44 mike Exp $ # See the "Main" test package for documentation @@ -19,7 +19,7 @@ sub start { my($conn) = @_; $conn->irspy_connect(undef, {}, - ZOOM::Event::RECV_APDU, \&connected, + ZOOM::Event::ZEND, \&connected, exception => \¬_connected); } diff --git a/lib/ZOOM/IRSpy/Test/Record/Fetch.pm b/lib/ZOOM/IRSpy/Test/Record/Fetch.pm index d3cb7bd..fb21d18 100644 --- a/lib/ZOOM/IRSpy/Test/Record/Fetch.pm +++ b/lib/ZOOM/IRSpy/Test/Record/Fetch.pm @@ -1,4 +1,4 @@ -# $Id: Fetch.pm,v 1.24 2007-02-22 17:45:43 mike Exp $ +# $Id: Fetch.pm,v 1.25 2007-02-23 15:03:44 mike Exp $ # See the "Main" test package for documentation @@ -29,7 +29,7 @@ sub start { # managed to search for in the Search/Bib1 or Search/Dan1 tests. # But how? So far we search for title: 1=4 $conn->irspy_search_pqf($queries[0], { queryindex => 0 }, {}, - ZOOM::Event::RECV_SEARCH, \&completed_search, + ZOOM::Event::ZEND, \&completed_search, exception => \&completed_search); } @@ -49,7 +49,7 @@ sub completed_search { $conn->log("irspy_test", "Trying another search ..."); $conn->irspy_search_pqf($queries[$qindex], { queryindex => $qindex }, {}, - ZOOM::Event::RECV_SEARCH, \&completed_search, + ZOOM::Event::ZEND, \&completed_search, exception => \&completed_search); return ZOOM::IRSpy::Status::TASK_DONE; } @@ -83,7 +83,7 @@ sub completed_search { last => ($i == $#syntax) }, { start => 0, count => 1, preferredRecordSyntax => $syntax }, - ZOOM::Event::RECV_RECORD, \&record, + ZOOM::Event::ZEND, \&record, exception => \&fetch_error); } diff --git a/lib/ZOOM/IRSpy/Test/ResultSet/Named.pm b/lib/ZOOM/IRSpy/Test/ResultSet/Named.pm index 3a5a950..346b4ec 100644 --- a/lib/ZOOM/IRSpy/Test/ResultSet/Named.pm +++ b/lib/ZOOM/IRSpy/Test/ResultSet/Named.pm @@ -1,4 +1,4 @@ -# $Id: Named.pm,v 1.1 2006-11-02 11:46:40 sondberg Exp $ +# $Id: Named.pm,v 1.2 2007-02-23 15:03:44 mike Exp $ # See the "Main" test package for documentation @@ -20,7 +20,7 @@ sub start { $conn->irspy_search_pqf("\@attr 1=4 mineral", {}, {'setname' => 'a', 'start' => 0, 'count' => 0}, - ZOOM::Event::RECV_SEARCH, \&completed_search_a, + ZOOM::Event::ZEND, \&completed_search_a, exception => \&error); } @@ -40,7 +40,7 @@ sub completed_search_a { {'record_a' => $record, 'hits_a' => $hits, 'rs_a' => $rs}, {'setname' => 'b'}, - ZOOM::Event::RECV_SEARCH, \&completed_search_b, + ZOOM::Event::ZEND, \&completed_search_b, exception => \&error); return ZOOM::IRSpy::Status::TASK_DONE; diff --git a/lib/ZOOM/IRSpy/Test/Search/Bib1.pm b/lib/ZOOM/IRSpy/Test/Search/Bib1.pm index 1b51773..81e58f1 100644 --- a/lib/ZOOM/IRSpy/Test/Search/Bib1.pm +++ b/lib/ZOOM/IRSpy/Test/Search/Bib1.pm @@ -1,4 +1,4 @@ -# $Id: Bib1.pm,v 1.14 2006-10-27 09:56:07 sondberg Exp $ +# $Id: Bib1.pm,v 1.15 2007-02-23 15:03:44 mike Exp $ # See the "Main" test package for documentation @@ -24,7 +24,7 @@ sub start { foreach my $attr (@attrs) { $conn->irspy_search_pqf("\@attr 1=$attr mineral", {'attr' => $attr}, {}, - ZOOM::Event::RECV_SEARCH, \&found, + ZOOM::Event::ZEND, \&found, exception => \&error); } } diff --git a/lib/ZOOM/IRSpy/Test/Search/Boolean.pm b/lib/ZOOM/IRSpy/Test/Search/Boolean.pm index c5d15c0..7289a37 100644 --- a/lib/ZOOM/IRSpy/Test/Search/Boolean.pm +++ b/lib/ZOOM/IRSpy/Test/Search/Boolean.pm @@ -1,4 +1,4 @@ -# $Id: Boolean.pm,v 1.3 2006-10-26 10:24:20 sondberg Exp $ +# $Id: Boolean.pm,v 1.4 2007-02-23 15:03:44 mike Exp $ # See the "Main" test package for documentation @@ -25,7 +25,7 @@ sub start { foreach my $operator (keys %pqfs) { $conn->irspy_search_pqf($pqfs{$operator}, {'operator' => $operator}, {}, - ZOOM::Event::RECV_SEARCH, \&found, + ZOOM::Event::ZEND, \&found, exception => \&error); } } diff --git a/lib/ZOOM/IRSpy/Test/Search/DBDate.pm b/lib/ZOOM/IRSpy/Test/Search/DBDate.pm index a7f3519..5359477 100644 --- a/lib/ZOOM/IRSpy/Test/Search/DBDate.pm +++ b/lib/ZOOM/IRSpy/Test/Search/DBDate.pm @@ -1,4 +1,4 @@ -# $Id: DBDate.pm,v 1.3 2006-11-29 18:18:38 mike Exp $ +# $Id: DBDate.pm,v 1.4 2007-02-23 15:03:44 mike Exp $ # This plugin tests searching on BIB-1 access-point 1011 (Date/time # added to db), the significance of which is that this search @@ -25,7 +25,7 @@ sub start { my($conn) = @_; $conn->irspy_search_pqf('@attr 1=1011 mineral', undef, {}, - ZOOM::Event::RECV_SEARCH, \&found, + ZOOM::Event::ZEND, \&found, "exception", \&error); } diff --git a/lib/ZOOM/IRSpy/Test/Search/Dan1.pm b/lib/ZOOM/IRSpy/Test/Search/Dan1.pm index 837a5e3..0c3ce35 100644 --- a/lib/ZOOM/IRSpy/Test/Search/Dan1.pm +++ b/lib/ZOOM/IRSpy/Test/Search/Dan1.pm @@ -1,4 +1,4 @@ -# $Id: Dan1.pm,v 1.5 2006-10-27 09:56:07 sondberg Exp $ +# $Id: Dan1.pm,v 1.6 2007-02-23 15:03:44 mike Exp $ # See the "Main" test package for documentation @@ -21,7 +21,7 @@ sub start { foreach my $attr (@attrs) { $conn->irspy_search_pqf("\@attr dan1 1=$attr mineral", {'attr' => $attr}, {}, - ZOOM::Event::RECV_SEARCH, \&found, + ZOOM::Event::ZEND, \&found, exception => \&error); } } @@ -48,6 +48,7 @@ sub error { $exception); update($conn, $attr, 0); + ### How about TEST_BAD if $exception->code() == 121? return ZOOM::IRSpy::Status::TASK_DONE; } diff --git a/lib/ZOOM/IRSpy/Test/Search/Explain.pm b/lib/ZOOM/IRSpy/Test/Search/Explain.pm index a369262..ab2cef2 100644 --- a/lib/ZOOM/IRSpy/Test/Search/Explain.pm +++ b/lib/ZOOM/IRSpy/Test/Search/Explain.pm @@ -1,4 +1,4 @@ -# $Id: Explain.pm,v 1.3 2006-10-26 12:55:35 mike Exp $ +# $Id: Explain.pm,v 1.4 2007-02-23 15:03:44 mike Exp $ # See the "Main" test package for documentation @@ -25,7 +25,7 @@ sub start { $conn->irspy_search_pqf('@attr exp-1 1=1 ' . $category, {'category' => $category}, { databaseName => 'IR-Explain-1' }, - ZOOM::Event::RECV_SEARCH, \&found, + ZOOM::Event::ZEND, \&found, exception => \&error); } } diff --git a/lib/ZOOM/IRSpy/Test/Search/Title.pm b/lib/ZOOM/IRSpy/Test/Search/Title.pm index 2705be6..86f5aec 100644 --- a/lib/ZOOM/IRSpy/Test/Search/Title.pm +++ b/lib/ZOOM/IRSpy/Test/Search/Title.pm @@ -1,4 +1,4 @@ -# $Id: Title.pm,v 1.9 2006-11-29 18:18:38 mike Exp $ +# $Id: Title.pm,v 1.10 2007-02-23 15:03:44 mike Exp $ # See the "Main" test package for documentation @@ -19,7 +19,7 @@ sub start { my($conn) = @_; $conn->irspy_search_pqf('@attr 1=4 mineral', undef, {}, - ZOOM::Event::RECV_SEARCH, \&found, + ZOOM::Event::ZEND, \&found, "exception", \&error); }