File Coverage

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