From: Mike Taylor Date: Wed, 11 Oct 2006 16:47:23 +0000 (+0000) Subject: Add error() X-Git-Tag: CPAN-v1.02~54^2~933 X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=commitdiff_plain;h=dc9bbb8ae09d481d587f5d9d7241b7aa68ad0746;hp=a6bf68ca3f1e0398c6f7da5fcde39cd059864296 Add error() Remove temporary variables. --- 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;