X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=lib%2FZOOM%2FIRSpy%2FTask%2FSearch.pm;fp=lib%2FZOOM%2FIRSpy%2FTask%2FSearch.pm;h=8b09d860bbdf5ecd2d7db9e8a14820349a06f636;hb=880bb74a2cc77e58aa99cbaeb300435316417e76;hp=0000000000000000000000000000000000000000;hpb=378c5b5e691e85900047ef38a913cc69b6537edc;p=irspy-moved-to-github.git diff --git a/lib/ZOOM/IRSpy/Task/Search.pm b/lib/ZOOM/IRSpy/Task/Search.pm new file mode 100644 index 0000000..8b09d86 --- /dev/null +++ b/lib/ZOOM/IRSpy/Task/Search.pm @@ -0,0 +1,73 @@ +# $Id: Search.pm,v 1.1 2006-10-06 11:33:08 mike Exp $ + +package ZOOM::IRSpy::Task::Search; + +use 5.008; +use strict; +use warnings; + +use ZOOM::IRSpy::Task; +our @ISA = qw(ZOOM::IRSpy::Task); + +=head1 NAME + +ZOOM::IRSpy::Task::Search - a searching task for IRSpy + +=head1 SYNOPSIS + + ## to follow + +=head1 DESCRIPTION + + ## to follow + +=cut + +sub new { + my $class = shift(); + my($query) = shift(); + + my $this = $class->SUPER::new(@_); + $this->{query} = $query; + $this->{rs} = undef; + return $this; +} + +sub run { + my $this = shift(); + + my $conn = $this->conn(); + my $query = $this->{query}; + $this->irspy()->log("irspy_test", $conn->option("host"), + " searching for '$query'"); + $this->{rs} = $conn->search_pqf($query); + # Wow -- that's it. +} + +sub render { + my $this = shift(); + return ref($this) . " " . $this->{query}; +} + +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;