Pass the bib-1 attribute number to the zoom callback by reference in the handle
authorAnders S. Mortensen <sondberg@indexdata.dk>
Tue, 26 Sep 2006 13:34:38 +0000 (13:34 +0000)
committerAnders S. Mortensen <sondberg@indexdata.dk>
Tue, 26 Sep 2006 13:34:38 +0000 (13:34 +0000)
member of the irspy object. And removing Search::Title from Test::Main since
it is contained in Bib-1.

lib/ZOOM/IRSpy/Test/Main.pm
lib/ZOOM/IRSpy/Test/Search/Bib1.pm

index 91a91f5..8f63a3d 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Main.pm,v 1.4 2006-09-26 13:12:28 sondberg Exp $
+# $Id: Main.pm,v 1.5 2006-09-26 13:34:38 sondberg Exp $
 
 package ZOOM::IRSpy::Test::Main;
 
 
 package ZOOM::IRSpy::Test::Main;
 
@@ -28,8 +28,7 @@ I<## To follow>
 sub run {
     my $this = shift();
 
 sub run {
     my $this = shift();
 
-    #return $this->run_tests(qw(Ping Search::Bib1));
-    return $this->run_tests(qw(Ping Search::Title Search::Bib1));
+    return $this->run_tests(qw(Ping Search::Bib1));
 }
 
 
 }
 
 
index be0f330..5645213 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Bib1.pm,v 1.1 2006-09-26 13:12:28 sondberg Exp $
+# $Id: Bib1.pm,v 1.2 2006-09-26 13:34:38 sondberg Exp $
 
 # See the "Main" test package for documentation
 
 
 # See the "Main" test package for documentation
 
@@ -23,7 +23,8 @@ sub run {
 
     foreach my $attr (@Bib1_Attr) {
         $pod->search_pqf('@attr 1=' . $attr . ' water' );
 
     foreach my $attr (@Bib1_Attr) {
         $pod->search_pqf('@attr 1=' . $attr . ' water' );
-        my $err = $pod->wait({'irspy' => $irspy, 'attr' => $attr});
+        $irspy->{'handle'}->{'attr'} = $attr;
+        my $err = $pod->wait($irspy);
     }
 
     return 0;
     }
 
     return 0;
@@ -31,9 +32,8 @@ sub run {
 
 
 sub found {
 
 
 sub found {
-    my($conn, $href, $rs, $event) = @_;
-    my $irspy = $href->{'irspy'};
-    my $attr = $href->{'attr'};
+    my($conn, $irspy, $rs, $event) = @_;
+    my $attr = $irspy->{'handle'}->{'attr'};
     my $n = $rs->size();
     my $rec = $irspy->record($conn);
 
     my $n = $rs->size();
     my $rec = $irspy->record($conn);