Yahoo/UK.pm

filter: Statementstmt 75.0% 15 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod n/a totaltotal 76.0% 19 / 25 CC 1 SCAR 1.8
CC
1
Cov
75%
_native_setup_search
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Yahoo.pm ↑ Summary Yahoo/Korea.pm »
1 # UK.pm
2 # by Martin Thurn
3 # $Id: UK.pm,v 1.10 2009/05/02 13:28:41 Martin Exp $
4  
5 =head1 NAME
6  
7 WWW::Search::Yahoo::UK - class for searching Yahoo! UK (not Ireland)
8  
9 =head1 SYNOPSIS
10  
11 use WWW::Search;
12 my $oSearch = new WWW::Search('Yahoo::UK');
13 my $sQuery = WWW::Search::escape_query("Surrey");
14 $oSearch->native_query($sQuery);
15 while (my $oResult = $oSearch->next_result())
16 print $oResult->url, "\n";
17  
18 =head1 DESCRIPTION
19  
20 This class is a Yahoo! UK specialization of L<WWW::Search>. It
21 handles making and interpreting searches on Yahoo! UK
22 F<http://uk.yahoo.com>.
23  
24 This class exports no public interface; all interaction should
25 be done through L<WWW::Search> objects.
26  
27 =head1 NOTES
28  
29 =head1 SEE ALSO
30  
31 To make new back-ends, see L<WWW::Search>.
32  
33 =head1 BUGS
34  
35 Please tell the maintainer if you find any!
36  
37 =head1 TESTING
38  
39 There are no tests defined for this module.
40  
41 =head1 AUTHOR
42  
43 C<WWW::Search::Yahoo> is maintained by Martin Thurn
44 (mthurn@cpan.org).
45  
46 =head1 LEGALESE
47  
48 Copyright (C) 1998-2009 Martin 'Kingpin' Thurn
49  
50 THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
51 WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
52 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
53  
54 =cut
55  
56 #####################################################################
57  
58 package WWW::Search::Yahoo::UK;
59  
60 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
61 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
62  
63 1 ▶use WWW::Search::Yahoo;
Subroutine BEGIN: called CC=1 SCAR=0.0
64  
65 1 ▶use base 'WWW::Search::Yahoo';
Subroutine BEGIN: called CC=1 SCAR=0.0
66  
67 our
68 1 $VERSION = '2.022';
69 1 our $MAINTAINER = 'Martin Thurn <mthurn@cpan.org>';
70  
71 sub _native_setup_search
72 0 ▶ {
Subroutine _native_setup_search: not called CC=1 SCAR=6.9
73 0 my ($self, $sQuery, $rh) = @_;
74 # print STDERR " + in UK::_native_setup_search, rh is ", Dumper($rh);
75 0 $self->{'_options'} = {
76 'p' => $sQuery,
77 'y' => 'uk',
78 };
79 0 $rh->{'search_base_url'} = 'http://uk.search.yahoo.com';
80 0 $rh->{'search_base_path'} = '/search/ukie';
81 # print STDERR " + Yahoo::UK::_native_setup_search() is calling SUPER::_native_setup_search()...\n";
82 0 return $self->SUPER::_native_setup_search($sQuery, $rh);
83 } # _native_setup_search
84  
85 1 1;
86  
87 __END__
« Yahoo.pm ↑ Summary Yahoo/Korea.pm »