KnowledgeGraphSearch/Result.pm

filter: Statementstmt 66.6% 26 / 39 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 66.6% 30 / 45 CC 1 SCAR 1.8
CC
1
Cov
67%
BUILD
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« KnowledgeGraphSearch.pm ↑ Summary
1 package WWW::Google::KnowledgeGraphSearch::Result;
2  
3 3 $WWW::Google::KnowledgeGraphSearch::Result::VERSION = '0.05';
4 3 $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.05
13  
14 =cut
15  
16 3 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 3 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 3 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 3 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 3 has 'raw' => (is => 'ro');
23 3 has 'id' => (is => 'ro');
24 3 has 'name' => (is => 'ro');
25 3 has 'type' => (is => 'ro');
26 3 has 'url' => (is => 'ro');
27 3 has 'imageUrl' => (is => 'ro');
28 3 has 'imageContentUrl' => (is => 'ro');
29 3 has 'description' => (is => 'ro');
30 3 has 'descriptionUrl' => (is => 'ro');
31 3 has 'descriptionBody' => (is => 'ro');
32 3 has 'descriptionLicense' => (is => 'ro');
33 3 has 'resultScore' => (is => 'ro');
34  
35 sub BUILD {
36 0 ▶ my ($self) = @_;
Subroutine BUILD: not called CC=1 SCAR=6.9
Pod undocumented
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<< <mohammad.anwar at yahoo.com> >>
84  
85 =head1 REPOSITORY
86  
87 L<https://github.com/manwar/WWW-Google-KnowledgeGraphSearch>
88  
89 =head1 BUGS
90  
91 Please report any bugs or feature requests to C<bug-www-google-knowledgegraphsearch at
92 rt.cpan.org>, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Google-KnowledgeGraphSearch>.
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<http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-Google-KnowledgeGraphCustomSearch>
109  
110 =item * AnnoCPAN: Annotated CPAN documentation
111  
112 L<http://annocpan.org/dist/WWW-Google-KnowledgeGraphSearch>
113  
114 =item * CPAN Ratings
115  
116 L<http://cpanratings.perl.org/d/WWW-Google-KnowledgeGraphSearch>
117  
118 =item * Search CPAN
119  
120 L<http://search.cpan.org/dist/WWW-Google-KnowledgeGraphSearch/>
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<http://www.perlfoundation.org/artistic_license_2_0>
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 3 1; # End of WWW::Google::KnowledgeGraphSearch::Result
« KnowledgeGraphSearch.pm ↑ Summary