File Coverage

blib/lib/WebService/Wikimapia/Location.pm
Criterion Covered Total %
statement 14 22 63.6
branch 0 2 0.0
condition n/a
subroutine 5 6 83.3
pod 0 1 0.0
total 19 31 61.2


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