1 # $Id: Search.pm,v 1.5 2006-10-25 13:36:47 mike Exp $
3 package ZOOM::IRSpy::Task::Search;
10 our @ISA = qw(ZOOM::IRSpy::Task);
14 ZOOM::IRSpy::Task::Search - a searching task for IRSpy
30 my $this = $class->SUPER::new(@_);
31 $this->{query} = $query;
41 my $conn = $this->conn();
42 my $query = $this->{query};
43 $this->irspy()->log("irspy_task", $conn->option("host"),
44 " searching for '$query'");
45 $this->{rs} = $conn->search_pqf($query);
49 # I want to catch the situation where a search is attempted on a
50 # not-yet opened connection (e.g. the Search::Title test is run
51 # before Ping) but since this situation doesn't involve the
52 # generation of a ZOOM event, the main loop won't see an error.
53 # So I check for it immediately:
55 # ### Unfortunately, this also fails to detect the condition I'm
56 # concerned with, so I think I am out of luck.
61 return ref($this) . "(" . $this->{query}. ")";
64 use overload '""' => \&render;
73 Mike Taylor, E<lt>mike@indexdata.comE<gt>
75 =head1 COPYRIGHT AND LICENSE
77 Copyright (C) 2006 by Index Data ApS.
79 This library is free software; you can redistribute it and/or modify
80 it under the same terms as Perl itself, either Perl version 5.8.7 or,
81 at your option, any later version of Perl 5 you may have available.