File Coverage

blib/lib/WWW/Google/DistanceMatrix/Result.pm
Criterion Covered Total %
statement 11 13 84.6
branch n/a
condition n/a
subroutine 4 5 80.0
pod 0 1 0.0
total 15 19 78.9


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