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