From d5ab5f3538820eaa378e744a74a1a84a7979f6b1 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Wed, 25 Oct 2006 15:45:29 +0000 Subject: [PATCH] New --- lib/ZOOM/IRSpy/Task/Retrieve.pm | 78 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 lib/ZOOM/IRSpy/Task/Retrieve.pm diff --git a/lib/ZOOM/IRSpy/Task/Retrieve.pm b/lib/ZOOM/IRSpy/Task/Retrieve.pm new file mode 100644 index 0000000..0583386 --- /dev/null +++ b/lib/ZOOM/IRSpy/Task/Retrieve.pm @@ -0,0 +1,78 @@ +# $Id: Retrieve.pm,v 1.1 2006-10-25 15:45:29 mike Exp $ + +package ZOOM::IRSpy::Task::Retrieve; + +use 5.008; +use strict; +use warnings; + +use ZOOM::IRSpy::Task; +our @ISA = qw(ZOOM::IRSpy::Task); + +=head1 NAME + +ZOOM::IRSpy::Task::Retrieve - a searching task for IRSpy + +=head1 SYNOPSIS + + ## to follow + +=head1 DESCRIPTION + + ## to follow + +=cut + +sub new { + my $class = shift(); + my($rs) = shift(); + my($index0) = shift(); + + my $this = $class->SUPER::new(@_); + $this->{rs} = $rs; + $this->{index0} = $index0; + return $this; +} + +sub run { + my $this = shift(); + + $this->set_options(); + + my $conn = $this->conn(); + my $rs = $this->{rs}; + my $index0 = $this->{index0}; + $this->irspy()->log("irspy_task", $conn->option("host"), + " retrieving record $index0 from $rs"); + $rs->records($index0, 1, 0); # requests record + + $this->set_options(); +} + +sub render { + my $this = shift(); + return ref($this) . "(" . $this->{rs}. ", " . $this->{index0} . ")"; +} + +use overload '""' => \&render; + + +=head1 SEE ALSO + +ZOOM::IRSpy + +=head1 AUTHOR + +Mike Taylor, Emike@indexdata.comE + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2006 by Index Data ApS. + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself, either Perl version 5.8.7 or, +at your option, any later version of Perl 5 you may have available. + +=cut + +1; -- 1.7.10.4