File Coverage

blib/lib/WWW/Google/Places/Photo.pm
Criterion Covered Total %
statement 14 22 63.6
branch n/a
condition n/a
subroutine 5 6 83.3
pod 0 1 0.0
total 19 29 65.5


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