line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::Scroogle::Result; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
21867
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
78
|
|
4
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
58
|
|
5
|
2
|
|
|
2
|
|
9
|
use Carp; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
804
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.004'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new |
10
|
|
|
|
|
|
|
{ |
11
|
7
|
|
|
7
|
1
|
1512
|
my $class = shift; |
12
|
7
|
|
|
|
|
13
|
my $options = shift; |
13
|
7
|
100
|
|
|
|
25
|
if (not ref $options eq "HASH") { croak 'no options hash provided!'; } |
|
1
|
|
|
|
|
173
|
|
14
|
6
|
100
|
|
|
|
7
|
if (not exists $ {$options}{url}) { croak 'url expected!'; } |
|
6
|
|
|
|
|
17
|
|
|
1
|
|
|
|
|
107
|
|
15
|
5
|
100
|
|
|
|
7
|
if (not exists $ {$options}{position}) { croak 'position expected!'; } |
|
5
|
|
|
|
|
13
|
|
|
1
|
|
|
|
|
90
|
|
16
|
4
|
100
|
|
|
|
5
|
if (not exists $ {$options}{searchstring}) { croak 'searchstring expected!'; } |
|
4
|
|
|
|
|
12
|
|
|
1
|
|
|
|
|
103
|
|
17
|
3
|
100
|
|
|
|
5
|
if (not exists $ {$options}{language}) { croak 'language expected!'; } |
|
3
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
80
|
|
18
|
|
|
|
|
|
|
|
19
|
2
|
|
|
|
|
3
|
my $self; |
20
|
2
|
|
|
|
|
4
|
$self->{url} = $ {$options}{url}; |
|
2
|
|
|
|
|
6
|
|
21
|
2
|
|
|
|
|
3
|
$self->{position} = $ {$options}{position}; |
|
2
|
|
|
|
|
5
|
|
22
|
2
|
|
|
|
|
4
|
$self->{searchstring} = $ {$options}{searchstring}; |
|
2
|
|
|
|
|
4
|
|
23
|
2
|
|
|
|
|
3
|
$self->{language} = $ {$options}{language}; |
|
2
|
|
|
|
|
3
|
|
24
|
2
|
|
|
|
|
6
|
bless $self, $class; |
25
|
|
|
|
|
|
|
|
26
|
2
|
|
|
|
|
7
|
return $self |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub searchstring |
30
|
|
|
|
|
|
|
{ |
31
|
3
|
100
|
|
3
|
1
|
902
|
ref(my $self = shift) |
32
|
|
|
|
|
|
|
or croak 'instance variable needed!'; |
33
|
2
|
|
|
|
|
9
|
return $self->{searchstring}; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub language |
37
|
|
|
|
|
|
|
{ |
38
|
3
|
100
|
|
3
|
1
|
382
|
ref(my $self = shift) |
39
|
|
|
|
|
|
|
or croak 'instance variable needed!'; |
40
|
2
|
|
|
|
|
13
|
return $self->{language}; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub position |
44
|
|
|
|
|
|
|
{ |
45
|
3
|
100
|
|
3
|
1
|
332
|
ref(my $self = shift) |
46
|
|
|
|
|
|
|
or croak 'instance variable needed!'; |
47
|
2
|
|
|
|
|
11
|
return $self->{position}; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub url |
51
|
|
|
|
|
|
|
{ |
52
|
3
|
100
|
|
3
|
1
|
320
|
ref(my $self = shift) |
53
|
|
|
|
|
|
|
or croak 'instance variable needed!'; |
54
|
2
|
|
|
|
|
9
|
return $self->{url}; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
1; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
__END__ |