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