WWW/Scraper/Response/Sherlock.pm untested

filter: Statementstmt 0.0% 0 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 13 Podpod 0.0% 0 / 10 totaltotal 0.0% 0 / 47 CC 1 SCAR 6.9
CC
1
Cov
0%
resultTitles
2.0
results
2.0
relevance
2.0
CRAP 2.0
1 package WWW::Scraper::Response::Sherlock;
2  
3 =pod
4  
5 =head1 NAME
6  
7 WWW::Scraper::Response::Sherlock - Results subclass for Sherlock plugins.
8  
9 =head1 SYNOPSIS
10  
11 WWW::Scraper::Response::Sherlock.pm
12  
13 =head1 DESCRIPTION
14  
15 =head1 AUTHOR
16  
17 C<Sherlock.pm> is written and maintained
18 by Glenn Wood, http://search.cpan.org/search?mode=author&query=GLENNWOOD.
19  
20 =head1 COPYRIGHT
21  
22 Copyright (c) 2001 Glenn Wood All rights reserved.
23  
24 This program is free software; you can redistribute it and/or
25 modify it under the same terms as Perl itself.
26  
27 =cut
28  
29  
30  
31 use strict;
32 use vars qw($VERSION @ISA);
33 @ISA = qw(WWW::Scraper::Response);
34 $VERSION = sprintf("%d.%02d", q$Revision: 1.0 $ =~ /(\d+)\.(\d+)/);
35 use WWW::Scraper::Response;
36  
37 sub resultTitles {
38 return {
39 'relevance' => 'Relevance'
40 ,'price' => 'Price'
41 ,'avail' => 'Available'
42 ,'date' => 'Date'
43 ,'name' => 'Name'
44 ,'email' => 'E-mail'
45 ,'detail' => 'Detail'
46 ,'url' => 'URL'
47 ,'browserResultType' => 'Browser Result Type'
48 };
49 }
50  
51 sub results {
52 my $self = shift;
53 return {
54 'relevance' => $self->relevance()
55 ,'price' => $self->price()
56 ,'avail' => $self->avail()
57 ,'date' => $self->date()
58 ,'name' => $self->name()
59 ,'email' => $self->email()
60 ,'detail' => $self->detail()
61 ,'browserResultType' => $self->browserResultType()
62 }
63 }
64  
65 sub relevance { return $_[0]->_elem('result_relevance'); }
66 sub price { return $_[0]->_elem('result_price'); }
67 sub avail { return $_[0]->_elem('result_avail'); }
68 sub date { return $_[0]->_elem('result_date'); }
69 sub name { return $_[0]->_elem('result_name'); }
70 sub email { return $_[0]->_elem('result_email'); }
71 sub detail { return $_[0]->_elem('result_detail'); }
72 sub browserResultType { return $_[0]->{'browserResultType'}; }
73 # sub url() is the same as for WWW::SearchResults.
74  
75 1;
76