File Coverage

blib/lib/WWW/StatsMix/UserAgent/Exception.pm
Criterion Covered Total %
statement 12 14 85.7
branch n/a
condition n/a
subroutine 4 5 80.0
pod 0 1 0.0
total 16 20 80.0


line stmt bran cond sub pod time code
1             package WWW::StatsMix::UserAgent::Exception;
2              
3             $WWW::StatsMix::UserAgent::Exception::VERSION = '0.06';
4              
5             =head1 NAME
6              
7             WWW::StatsMix::UserAgent::Exception - StatsMix API user agent exception class.
8              
9             =head1 VERSION
10              
11             Version 0.06
12              
13             =cut
14              
15 12     12   287 use 5.006;
  12         43  
  12         420  
16 12     12   52 use Moo;
  12         19  
  12         119  
17 12     12   3652 use namespace::clean;
  12         21  
  12         98  
18             with 'Throwable';
19              
20 12     12   2611 use overload q{""} => 'as_string', fallback => 1;
  12         23  
  12         101  
21              
22             has method => (is => 'ro');
23             has message => (is => 'ro');
24             has code => (is => 'ro');
25             has filename => (is => 'ro');
26             has line_number => (is => 'ro');
27              
28             sub as_string {
29 0     0 0   my ($self) = @_;
30              
31 0           return sprintf("%s(): %s (status: %s) file %s on line %d\n",
32             $self->method, $self->message, $self->code,
33             $self->filename, $self->line_number);
34             }
35              
36             =head1 AUTHOR
37              
38             Mohammad S Anwar, C<< >>
39              
40             =head1 REPOSITORY
41              
42             L
43              
44             =head1 BUGS
45              
46             Please report any bugs or feature requests to C,
47             or through the web interface at L.
48             I will be notified, and then you'll automatically be notified of progress on your
49             bug as I make changes.
50              
51             =head1 SUPPORT
52              
53             You can find documentation for this module with the perldoc command.
54              
55             perldoc WWW::StatsMix::UserAgent::Exception
56              
57             You can also look for information at:
58              
59             =over 4
60              
61             =item * RT: CPAN's request tracker (report bugs here)
62              
63             L
64              
65             =item * AnnoCPAN: Annotated CPAN documentation
66              
67             L
68              
69             =item * CPAN Ratings
70              
71             L
72              
73             =item * Search CPAN
74              
75             L
76              
77             =back
78              
79             Copyright (C) 2014 - 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::StatsMix::UserAgent::Exception