From: Anders S. Mortensen Date: Tue, 26 Sep 2006 13:34:38 +0000 (+0000) Subject: Pass the bib-1 attribute number to the zoom callback by reference in the handle X-Git-Tag: CPAN-v1.02~1024 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=9c80aea329ceb2734fd6b38ee9a1933968d30410;p=irspy-moved-to-github.git 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. --- 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);