line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::Google::KnowledgeGraphSearch::Result; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
$WWW::Google::KnowledgeGraphSearch::Result::VERSION = '0.07'; |
4
|
|
|
|
|
|
|
$WWW::Google::KnowledgeGraphSearch::Result::AUTHORITY = 'cpan:MANWAR'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
WWW::Google::KnowledgeGraphSearch::Result - Placeholder for Google Knowledge Graph Search Result. |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Version 0.07 |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
|
16
|
3
|
|
|
3
|
|
63
|
use 5.006; |
|
3
|
|
|
|
|
10
|
|
17
|
3
|
|
|
3
|
|
16
|
use Data::Dumper; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
166
|
|
18
|
|
|
|
|
|
|
|
19
|
3
|
|
|
3
|
|
20
|
use Moo; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
24
|
|
20
|
3
|
|
|
3
|
|
1075
|
use namespace::autoclean; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
30
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
has 'raw' => (is => 'ro'); |
23
|
|
|
|
|
|
|
has 'id' => (is => 'ro'); |
24
|
|
|
|
|
|
|
has 'name' => (is => 'ro'); |
25
|
|
|
|
|
|
|
has 'type' => (is => 'ro'); |
26
|
|
|
|
|
|
|
has 'url' => (is => 'ro'); |
27
|
|
|
|
|
|
|
has 'imageUrl' => (is => 'ro'); |
28
|
|
|
|
|
|
|
has 'imageContentUrl' => (is => 'ro'); |
29
|
|
|
|
|
|
|
has 'description' => (is => 'ro'); |
30
|
|
|
|
|
|
|
has 'descriptionUrl' => (is => 'ro'); |
31
|
|
|
|
|
|
|
has 'descriptionBody' => (is => 'ro'); |
32
|
|
|
|
|
|
|
has 'descriptionLicense' => (is => 'ro'); |
33
|
|
|
|
|
|
|
has 'resultScore' => (is => 'ro'); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub BUILD { |
36
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
my $raw = $self->raw; |
39
|
0
|
|
|
|
|
|
$self->{'id'} = $raw->{'result'}->{'@id'}; |
40
|
0
|
|
|
|
|
|
$self->{'name'} = $raw->{'result'}->{'name'}; |
41
|
0
|
|
|
|
|
|
$self->{'type'} = $raw->{'result'}->{'@type'}; |
42
|
0
|
|
|
|
|
|
$self->{'url'} = $raw->{'result'}->{'url'}; |
43
|
0
|
|
|
|
|
|
$self->{'imageUrl'} = $raw->{'result'}->{'image'}->{'url'}; |
44
|
0
|
|
|
|
|
|
$self->{'imageContentUrl'} = $raw->{'result'}->{'image'}->{'contentUrl'}; |
45
|
0
|
|
|
|
|
|
$self->{'description'} = $raw->{'result'}->{'description'}; |
46
|
0
|
|
|
|
|
|
$self->{'descriptionUrl'} = $raw->{'result'}->{'detailedDescription'}->{'url'}; |
47
|
0
|
|
|
|
|
|
$self->{'descriptionBody'} = $raw->{'result'}->{'detailedDescription'}->{'articleBody'}; |
48
|
0
|
|
|
|
|
|
$self->{'descriptionLicense'} = $raw->{'result'}->{'detailedDescription'}->{'license'}; |
49
|
0
|
|
|
|
|
|
$self->{'resultScore'} = $raw->{'resultScore'}; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 DESCRIPTION |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Provides the interface to the individual search results based on the search criteria. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 METHODS |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head2 id() |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head2 name() |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head2 type() |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head2 url() |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head2 imageUrl() |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head2 imageContentUrl() |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head2 description() |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head2 descriptionUrl() |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head2 descriptionBody() |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head2 descriptionLicense() |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head2 resultScore() |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 AUTHOR |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Mohammad S Anwar, C<< >> |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 REPOSITORY |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
L |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 BUGS |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Please report any bugs or feature requests to C
|
92
|
|
|
|
|
|
|
rt.cpan.org>, or through the web interface at L. |
93
|
|
|
|
|
|
|
I will be notified, and then you'll automatically be notified of progress on your |
94
|
|
|
|
|
|
|
bug as I make changes. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 SUPPORT |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
perldoc WWW::Google::KnowledgeGraphSearch::Result |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
You can also look for information at: |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=over 4 |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker (report bugs here) |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
L |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
L |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=item * CPAN Ratings |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
L |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=item * Search CPAN |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
L |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=back |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
Copyright (C) 2017 Mohammad S Anwar. |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
This program is free software; you can redistribute it and / or modify it under |
129
|
|
|
|
|
|
|
the terms of the the Artistic License (2.0). You may obtain a copy of the full |
130
|
|
|
|
|
|
|
license at: |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
L |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
Any use, modification, and distribution of the Standard or Modified Versions is |
135
|
|
|
|
|
|
|
governed by this Artistic License.By using, modifying or distributing the Package, |
136
|
|
|
|
|
|
|
you accept this license. Do not use, modify, or distribute the Package, if you do |
137
|
|
|
|
|
|
|
not accept this license. |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
If your Modified Version has been derived from a Modified Version made by someone |
140
|
|
|
|
|
|
|
other than you,you are nevertheless required to ensure that your Modified Version |
141
|
|
|
|
|
|
|
complies with the requirements of this license. |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
This license does not grant you the right to use any trademark, service mark, |
144
|
|
|
|
|
|
|
tradename, or logo of the Copyright Holder. |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
This license includes the non-exclusive, worldwide, free-of-charge patent license |
147
|
|
|
|
|
|
|
to make, have made, use, offer to sell, sell, import and otherwise transfer the |
148
|
|
|
|
|
|
|
Package with respect to any patent claims licensable by the Copyright Holder that |
149
|
|
|
|
|
|
|
are necessarily infringed by the Package. If you institute patent litigation |
150
|
|
|
|
|
|
|
(including a cross-claim or counterclaim) against any party alleging that the |
151
|
|
|
|
|
|
|
Package constitutes direct or contributory patent infringement,then this Artistic |
152
|
|
|
|
|
|
|
License to you shall terminate on the date that such litigation is filed. |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND |
155
|
|
|
|
|
|
|
CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED |
156
|
|
|
|
|
|
|
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR |
157
|
|
|
|
|
|
|
NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS |
158
|
|
|
|
|
|
|
REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, |
159
|
|
|
|
|
|
|
INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE |
160
|
|
|
|
|
|
|
OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
=cut |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
1; # End of WWW::Google::KnowledgeGraphSearch::Result |