From: Mike Taylor Date: Thu, 10 Jun 2010 13:14:45 +0000 (+0100) Subject: Piggy-backed OPAC records are counted as valid only if X-Git-Tag: CPAN-v1.02~43 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=bedf9cabf4e20c3deb051f7adb0ad88252a27df4;p=irspy-moved-to-github.git Piggy-backed OPAC records are counted as valid only if $rec->error()==0, i.e. the record is not a surrogate diagnostic. --- diff --git a/lib/ZOOM/IRSpy/Test/Record/OPAC.pm b/lib/ZOOM/IRSpy/Test/Record/OPAC.pm index ee918b6..4045201 100644 --- a/lib/ZOOM/IRSpy/Test/Record/OPAC.pm +++ b/lib/ZOOM/IRSpy/Test/Record/OPAC.pm @@ -33,6 +33,7 @@ sub start { my $class = shift(); my($conn) = @_; + #$conn->option(apdulog => 1); $conn->option(preferredRecordSyntax => "opac"); $conn->irspy_search_pqf($queries[0], { queryindex => 0 }, \%options, ZOOM::Event::ZEND, \&completed_search, @@ -75,7 +76,7 @@ sub completed_search { # that those records be included in the Search Response using # piggybacking. Was it done? my $rec = $task->{rs}->record_immediate(2); - my $ok = defined $rec; + my $ok = defined $rec && $rec->error() == 0; $task->{rs}->destroy(); $conn->record()->store_result('multiple_opac', 'ok' => $ok);