File Coverage

blib/lib/Address/PostCode/UserAgent/Exception.pm
Criterion Covered Total %
statement 14 16 87.5
branch n/a
condition n/a
subroutine 5 6 83.3
pod 0 1 0.0
total 19 23 82.6


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