line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
=head1 NAME |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
WWW::Search::NULL - class for searching any web site |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 SYNOPSIS |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
require WWW::Search; |
9
|
|
|
|
|
|
|
$search = new WWW::Search('Null'); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 DESCRIPTION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
This class is a specialization of WWW::Search that only returns an |
14
|
|
|
|
|
|
|
error message. |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
This class exports no public interface; all interaction should be done |
17
|
|
|
|
|
|
|
through WWW::Search objects. |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
This modules is really a hack for systems that want to include |
20
|
|
|
|
|
|
|
indices that have no corresponding WWW::Search module (like UNIONS) |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 AUTHOR |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
C is written by Paul Lindner, |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 COPYRIGHT |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Copyright (c) 1998 by the United Nations Administrative Committee |
29
|
|
|
|
|
|
|
on Coordination (ACC) |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
All rights reserved. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
package WWW::Search::Null; |
36
|
|
|
|
|
|
|
|
37
|
1
|
|
|
1
|
|
1816
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
38
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
39
|
|
|
|
|
|
|
|
40
|
1
|
|
|
1
|
|
5
|
use base 'WWW::Search'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
101
|
|
41
|
|
|
|
|
|
|
|
42
|
1
|
|
|
1
|
|
6
|
use Carp (); |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
18
|
|
43
|
1
|
|
|
1
|
|
4
|
use WWW::SearchResult; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
192
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
our |
46
|
|
|
|
|
|
|
$VERSION = do { my @r = (q$Revision: 1.6 $ =~ /\d+/g); sprintf "%d."."%03d" x $#r, @r }; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub _native_setup_search |
49
|
|
|
|
|
|
|
{ |
50
|
0
|
|
|
0
|
|
|
my $self = shift; |
51
|
0
|
|
|
|
|
|
my ($native_query, $native_opt) = @_; |
52
|
0
|
|
|
|
|
|
my $native_url; |
53
|
0
|
|
|
|
|
|
$self->{_next_to_retrieve} = 0; |
54
|
0
|
|
|
|
|
|
$self->{_base_url} = $self->{_next_url} = $native_url; |
55
|
|
|
|
|
|
|
} # _native_setup_search |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub _native_retrieve_some |
58
|
|
|
|
|
|
|
{ |
59
|
0
|
|
|
0
|
|
|
my $self = shift; |
60
|
|
|
|
|
|
|
# Null search just returns an error.. |
61
|
0
|
0
|
|
|
|
|
return if (!defined($self->{_next_url})); |
62
|
0
|
|
|
|
|
|
my $response = new HTTP::Response(500, "This is a dummy search engine."); |
63
|
0
|
|
|
|
|
|
$self->{response} = $response; |
64
|
|
|
|
|
|
|
} # _native_retrieve_some |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
__END__ |