Places/Address.pm

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