From dc9bbb8ae09d481d587f5d9d7241b7aa68ad0746 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Wed, 11 Oct 2006 16:47:23 +0000 Subject: [PATCH] Add error() Remove temporary variables. --- lib/ZOOM/IRSpy/Test/Search/Bib1.pm | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/lib/ZOOM/IRSpy/Test/Search/Bib1.pm b/lib/ZOOM/IRSpy/Test/Search/Bib1.pm index 93bcd7a..56a43fb 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.5 2006-10-06 11:33:08 mike Exp $ +# $Id: Bib1.pm,v 1.6 2006-10-11 16:47:23 mike Exp $ # See the "Main" test package for documentation @@ -35,12 +35,26 @@ sub found { my $n = $task->{rs}->size(); $conn->log("irspy_test", "search found $n record", $n==1 ? "" : "s"); - my $rec = $conn->record(); - $rec->append_entry("irspy:status", "" . - isodate(time()) . ""); + ### Need to get the BIB-1 attribute into this callback + $conn->record()->append_entry("irspy:status", + "" . + isodate(time()) . + ""); return ZOOM::IRSpy::Status::TASK_DONE; } +sub error { + my($conn, $task, $exception) = @_; + + $conn->log("irspy_test", "error: $exception"); + $conn->record()->append_entry("irspy:status", + "" . + isodate(time()) . + ""); + return ZOOM::IRSpy::Status::TASK_DONE; +} + + 1; -- 1.7.10.4