| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Net::Domain::Info::SEO; |
|
2
|
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
3131
|
use strict; |
|
|
3
|
|
|
|
|
5
|
|
|
|
3
|
|
|
|
|
113
|
|
|
4
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
|
3
|
|
|
|
|
5
|
|
|
|
3
|
|
|
|
|
120
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
3787
|
use WWW::Google::PageRank; |
|
|
3
|
|
|
|
|
171814
|
|
|
|
3
|
|
|
|
|
132
|
|
|
7
|
3
|
|
|
3
|
|
1901
|
use WWW::Yandex::TIC; |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use WWW::Yahoo::InboundLinks; |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
use Class::Easy; |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $PROVIDERS = { |
|
13
|
|
|
|
|
|
|
page_rank => { |
|
14
|
|
|
|
|
|
|
pack => 'WWW::Google::PageRank', |
|
15
|
|
|
|
|
|
|
proto => 1 # require http:// prefix, |
|
16
|
|
|
|
|
|
|
}, |
|
17
|
|
|
|
|
|
|
tic => { |
|
18
|
|
|
|
|
|
|
pack => 'WWW::Yandex::TIC', |
|
19
|
|
|
|
|
|
|
proto => 0 |
|
20
|
|
|
|
|
|
|
}, |
|
21
|
|
|
|
|
|
|
inbound_links => { |
|
22
|
|
|
|
|
|
|
pack =>'WWW::Yahoo::InboundLinks', |
|
23
|
|
|
|
|
|
|
proto => 1 |
|
24
|
|
|
|
|
|
|
} |
|
25
|
|
|
|
|
|
|
}; |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $class = __PACKAGE__; |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub _init { |
|
30
|
|
|
|
|
|
|
my $class = shift; |
|
31
|
|
|
|
|
|
|
my $parent = shift; |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
make_accessor ($parent, 'page_rank', default => \&page_rank); |
|
34
|
|
|
|
|
|
|
make_accessor ($parent, 'tic', default => \&tic); |
|
35
|
|
|
|
|
|
|
make_accessor ($parent, 'inbound_links', default => \&inbound_links); |
|
36
|
|
|
|
|
|
|
} |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub provider { |
|
39
|
|
|
|
|
|
|
my $self = shift; |
|
40
|
|
|
|
|
|
|
my $type = shift; |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
return $PROVIDERS->{$type}->{pack}->new (@_); |
|
43
|
|
|
|
|
|
|
} |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub entity { |
|
46
|
|
|
|
|
|
|
my $self = shift; |
|
47
|
|
|
|
|
|
|
my $type = shift; |
|
48
|
|
|
|
|
|
|
my $name = shift; |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
return $PROVIDERS->{$type}->{proto} ? "http://$name" : $name; |
|
51
|
|
|
|
|
|
|
} |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub rank { |
|
54
|
|
|
|
|
|
|
my $self = shift; |
|
55
|
|
|
|
|
|
|
my $type = shift; |
|
56
|
|
|
|
|
|
|
my $domain = shift; |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
if ($domain->{$type} and $#{$domain->{$type}} > 0) { # two elements or more |
|
59
|
|
|
|
|
|
|
return $domain->{$type}->[0]; |
|
60
|
|
|
|
|
|
|
} |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
my $provider = $class->provider ($type, @_); |
|
63
|
|
|
|
|
|
|
my $entity = $class->entity ($type, $domain->name); |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
my ($rank, $resp) = $provider->get ($entity); |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
$domain->{$type} = [$rank, $resp]; |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
return $rank; |
|
70
|
|
|
|
|
|
|
} |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub page_rank { |
|
73
|
|
|
|
|
|
|
my $self = shift; |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
my $type = 'page_rank'; |
|
76
|
|
|
|
|
|
|
return $class->rank ($type, $self, @_); |
|
77
|
|
|
|
|
|
|
} |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
sub tic { |
|
80
|
|
|
|
|
|
|
my $self = shift; |
|
81
|
|
|
|
|
|
|
return $class->rank ('tic', $self, @_); |
|
82
|
|
|
|
|
|
|
} |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
sub inbound_links { |
|
85
|
|
|
|
|
|
|
my $self = shift; |
|
86
|
|
|
|
|
|
|
return $class->rank ('inbound_links', $self, @_); |
|
87
|
|
|
|
|
|
|
} |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
1; |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 NAME |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Net::Domain::Info::SEO - Net::Domain::Info plugin for requesting |
|
94
|
|
|
|
|
|
|
search engines information for domain |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
use Net::Domain::Info qw(::SEO); # used Whois plugin |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
Net::Domain::Info->new ($domain); |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
$domain_info->page_rank; |
|
103
|
|
|
|
|
|
|
$domain_info->tic; |
|
104
|
|
|
|
|
|
|
$domain_info->inbound_links; |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head1 METHODS |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=head2 page_rank |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
Google Page Rank. |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=cut |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head2 tic |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
Yandex тИЦ |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=cut |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=head2 inbound_links |
|
121
|
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
Yahoo inbound links count. |
|
123
|
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=cut |
|
125
|
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=head1 AUTHOR |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
Ivan Baktsheev, C<< >> |
|
129
|
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=head1 BUGS |
|
131
|
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
Please report any bugs or feature requests to my email address, |
|
133
|
|
|
|
|
|
|
or through the web interface at L. |
|
134
|
|
|
|
|
|
|
I will be notified, and then you'll automatically be notified |
|
135
|
|
|
|
|
|
|
of progress on your bug as I make changes. |
|
136
|
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=head1 SUPPORT |
|
138
|
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
|
146
|
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
Copyright 2008 Ivan Baktsheev |
|
148
|
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
|
150
|
|
|
|
|
|
|
under the same terms as Perl itself. |
|
151
|
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=cut |