| 1 | package WWW::Google::Places::Review; | ||||||||||
| 2 | |||||||||||
| 3 | 8 | $WWW::Google::Places::Review::VERSION = '0.35'; | |||||||||
| 4 | 8 | $WWW::Google::Places::Review::AUTHORITY = 'cpan:MANWAR'; | |||||||||
| 5 | |||||||||||
| 6 | =head1 NAME | ||||||||||
| 7 | |||||||||||
| 8 | WWW::Google::Places::Review - Represent 'review' of place. | ||||||||||
| 9 | |||||||||||
| 10 | =head1 VERSION | ||||||||||
| 11 | |||||||||||
| 12 | Version 0.35 | ||||||||||
| 13 | |||||||||||
| 14 | =cut | ||||||||||
| 15 | |||||||||||
| 16 | 8 | ▶ | use WWW::Google::Places::Review::Aspect; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 17 | |||||||||||
| 18 | 8 | ▶ | use 5.006; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 19 | 8 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 20 | 8 | ▶ | use namespace::clean; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 21 | |||||||||||
| 22 | 8 | ▶ | use overload q{""} => 'as_string', fallback => 1; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 23 | |||||||||||
| 24 | 0 | ▶ | has 'author_name' => (is => 'ro', default => sub { 'N/A' }); | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||
| 25 | 0 | ▶ | has 'author_url' => (is => 'ro', default => sub { 'N/A' }); | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||
| 26 | 0 | ▶ | has 'language' => (is => 'ro', default => sub { 'N/A' }); | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||
| 27 | 0 | ▶ | has 'rating' => (is => 'ro', default => sub { 'N/A' }); | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||
| 28 | 0 | ▶ | has 'text' => (is => 'ro', default => sub { 'N/A' }); | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||
| 29 | 0 | ▶ | has 'time' => (is => 'ro', default => sub { 'N/A' }); | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||
| 30 | 8 | has 'aspects' => (is => 'rw', predicate => 1); | |||||||||
| 31 | |||||||||||
| 32 | sub BUILD { | ||||||||||
| 33 | 0 | ▶ | my ($self) = @_; | ||||||||
|
Subroutine
BUILD: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||
| 34 | |||||||||||
| 35 | 0 | ▶ | if ($self->has_aspects) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 36 | 0 | my $aspects = $self->aspects; | |||||||||
| 37 | 0 | my $objects = []; | |||||||||
| 38 | 0 | foreach (@$aspects) { | |||||||||
| 39 | 0 | push @$objects, WWW::Google::Places::Review::Aspect->new($_); | |||||||||
| 40 | } | ||||||||||
| 41 | 0 | $self->aspects($objects); | |||||||||
| 42 | } | ||||||||||
| 43 | } | ||||||||||
| 44 | |||||||||||
| 45 | =head1 METHODS | ||||||||||
| 46 | |||||||||||
| 47 | =head2 author_name() | ||||||||||
| 48 | |||||||||||
| 49 | Returns author name. | ||||||||||
| 50 | |||||||||||
| 51 | =head2 author_url() | ||||||||||
| 52 | |||||||||||
| 53 | Returns author URL. | ||||||||||
| 54 | |||||||||||
| 55 | =head2 language() | ||||||||||
| 56 | |||||||||||
| 57 | Returns review language. | ||||||||||
| 58 | |||||||||||
| 59 | =head2 rating() | ||||||||||
| 60 | |||||||||||
| 61 | Returns reviews rating. | ||||||||||
| 62 | |||||||||||
| 63 | =head2 text() | ||||||||||
| 64 | |||||||||||
| 65 | Returns reviews text. | ||||||||||
| 66 | |||||||||||
| 67 | =head2 time() | ||||||||||
| 68 | |||||||||||
| 69 | Returns reviews time. | ||||||||||
| 70 | |||||||||||
| 71 | =head2 aspects() | ||||||||||
| 72 | |||||||||||
| 73 | Returns reviews aspects. | ||||||||||
| 74 | |||||||||||
| 75 | =cut | ||||||||||
| 76 | |||||||||||
| 77 | sub as_string { | ||||||||||
| 78 | 0 | ▶ | my ($self) = @_; | ||||||||
|
Subroutine
as_string: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 79 | |||||||||||
| 80 | 0 | my $review = ''; | |||||||||
| 81 | 0 | $review .= sprintf("Author Name: %s\n", $self->author_name); | |||||||||
| 82 | 0 | $review .= sprintf("Author URL : %s\n", $self->author_url); | |||||||||
| 83 | 0 | $review .= sprintf("Language : %s\n", $self->language); | |||||||||
| 84 | 0 | $review .= sprintf("Rating : %s\n", $self->rating); | |||||||||
| 85 | 0 | $review .= sprintf("Text : %s\n", $self->text); | |||||||||
| 86 | 0 | $review .= sprintf("Time : %s\n", $self->time); | |||||||||
| 87 | 0 | $review .= sprintf("Aspects : %s", $self->aspects); | |||||||||
| 88 | |||||||||||
| 89 | 0 | return $review; | |||||||||
| 90 | } | ||||||||||
| 91 | =head1 AUTHOR | ||||||||||
| 92 | |||||||||||
| 93 | Mohammad S Anwar, C<< <mohammad.anwar at yahoo.com> >> | ||||||||||
| 94 | |||||||||||
| 95 | =head1 REPOSITORY | ||||||||||
| 96 | |||||||||||
| 97 | L<https://github.com/manwar/WWW-Google-Places> | ||||||||||
| 98 | |||||||||||
| 99 | =head1 BUGS | ||||||||||
| 100 | |||||||||||
| 101 | Please report any bugs or feature requests to C<bug-www-google-places at rt.cpan.org>, | ||||||||||
| 102 | or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Google-Places>. | ||||||||||
| 103 | I will be notified, and then you'll automatically be notified of progress on your | ||||||||||
| 104 | bug as I make changes. | ||||||||||
| 105 | |||||||||||
| 106 | =head1 SUPPORT | ||||||||||
| 107 | |||||||||||
| 108 | You can find documentation for this module with the perldoc command. | ||||||||||
| 109 | |||||||||||
| 110 | perldoc WWW::Google::Places::Review | ||||||||||
| 111 | |||||||||||
| 112 | You can also look for information at: | ||||||||||
| 113 | |||||||||||
| 114 | =over 4 | ||||||||||
| 115 | |||||||||||
| 116 | =item * RT: CPAN's request tracker (report bugs here) | ||||||||||
| 117 | |||||||||||
| 118 | L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-Google-Places> | ||||||||||
| 119 | |||||||||||
| 120 | =item * AnnoCPAN: Annotated CPAN documentation | ||||||||||
| 121 | |||||||||||
| 122 | L<http://annocpan.org/dist/WWW-Google-Places> | ||||||||||
| 123 | |||||||||||
| 124 | =item * CPAN Ratings | ||||||||||
| 125 | |||||||||||
| 126 | L<http://cpanratings.perl.org/d/WWW-Google-Places> | ||||||||||
| 127 | |||||||||||
| 128 | =item * Search CPAN | ||||||||||
| 129 | |||||||||||
| 130 | L<http://search.cpan.org/dist/WWW-Google-Places/> | ||||||||||
| 131 | |||||||||||
| 132 | =back | ||||||||||
| 133 | |||||||||||
| 134 | =head1 LICENSE AND COPYRIGHT | ||||||||||
| 135 | |||||||||||
| 136 | Copyright (C) 2011 - 2016 Mohammad S Anwar. | ||||||||||
| 137 | |||||||||||
| 138 | This program is free software; you can redistribute it and / or modify it under | ||||||||||
| 139 | the terms of the the Artistic License (2.0). You may obtain a copy of the full | ||||||||||
| 140 | license at: | ||||||||||
| 141 | |||||||||||
| 142 | L<http://www.perlfoundation.org/artistic_license_2_0> | ||||||||||
| 143 | |||||||||||
| 144 | Any use, modification, and distribution of the Standard or Modified Versions is | ||||||||||
| 145 | governed by this Artistic License.By using, modifying or distributing the Package, | ||||||||||
| 146 | you accept this license. Do not use, modify, or distribute the Package, if you do | ||||||||||
| 147 | not accept this license. | ||||||||||
| 148 | |||||||||||
| 149 | If your Modified Version has been derived from a Modified Version made by someone | ||||||||||
| 150 | other than you,you are nevertheless required to ensure that your Modified Version | ||||||||||
| 151 | complies with the requirements of this license. | ||||||||||
| 152 | |||||||||||
| 153 | This license does not grant you the right to use any trademark, service mark, | ||||||||||
| 154 | tradename, or logo of the Copyright Holder. | ||||||||||
| 155 | |||||||||||
| 156 | This license includes the non-exclusive, worldwide, free-of-charge patent license | ||||||||||
| 157 | to make, have made, use, offer to sell, sell, import and otherwise transfer the | ||||||||||
| 158 | Package with respect to any patent claims licensable by the Copyright Holder that | ||||||||||
| 159 | are necessarily infringed by the Package. If you institute patent litigation | ||||||||||
| 160 | (including a cross-claim or counterclaim) against any party alleging that the | ||||||||||
| 161 | Package constitutes direct or contributory patent infringement,then this Artistic | ||||||||||
| 162 | License to you shall terminate on the date that such litigation is filed. | ||||||||||
| 163 | |||||||||||
| 164 | Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND | ||||||||||
| 165 | CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED | ||||||||||
| 166 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR | ||||||||||
| 167 | NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS | ||||||||||
| 168 | REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, | ||||||||||
| 169 | INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE | ||||||||||
| 170 | OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||||||||
| 171 | |||||||||||
| 172 | =cut | ||||||||||
| 173 | |||||||||||
| 174 | 8 | 1; # End of WWW::Google::Places::Review | |||||||||