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