From 9c80aea329ceb2734fd6b38ee9a1933968d30410 Mon Sep 17 00:00:00 2001 From: "Anders S. Mortensen" Date: Tue, 26 Sep 2006 13:34:38 +0000 Subject: [PATCH] Pass the bib-1 attribute number to the zoom callback by reference in the handle 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 | 5 ++--- lib/ZOOM/IRSpy/Test/Search/Bib1.pm | 10 +++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/ZOOM/IRSpy/Test/Main.pm b/lib/ZOOM/IRSpy/Test/Main.pm index 91a91f5..8f63a3d 100644 --- a/lib/ZOOM/IRSpy/Test/Main.pm +++ b/lib/ZOOM/IRSpy/Test/Main.pm @@ -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; @@ -28,8 +28,7 @@ I<## To follow> 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)); } diff --git a/lib/ZOOM/IRSpy/Test/Search/Bib1.pm b/lib/ZOOM/IRSpy/Test/Search/Bib1.pm index be0f330..5645213 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.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 @@ -23,7 +23,8 @@ sub run { 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; @@ -31,9 +32,8 @@ sub run { 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); -- 1.7.10.4