API/Exception.pm

filter: Statementstmt 89.4% 17 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 84.0% 21 / 25 CC 1 SCAR 1.8
CC
1
Cov
89%
as_string
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« API/UserAgent.pm ↑ Summary
1 package Map::Tube::API::Exception;
2  
3 1 $Map::Tube::API::Exception::VERSION = '0.09';
4 1 $Map::Tube::API::Exception::AUTHORITY = 'cpan:MANWAR';
5  
6 =head1 NAME
7  
8 Map::Tube::API::Exception - Interface to exception class for Map::Tube::API.
9  
10 =head1 VERSION
11  
12 Version 0.09
13  
14 =cut
15  
16 1 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 1 with 'Throwable';
20  
21 1 ▶use overload q{""} => 'as_string', fallback => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
22  
23 1 has code => (is => 'ro', required => 1);
24 1 has message => (is => 'ro', required => 1);
25  
26 sub as_string {
27 0 ▶ my ($self) = @_;
Subroutine as_string: not called CC=1 SCAR=6.9
Pod undocumented
28  
29 0 return sprintf("ERROR: %s (status: %s)\n", $self->message, $self->code);
30 }
31  
32 =head1 DESCRIPTION
33  
34 B<FOR INTERNAL USE ONLY>
35  
36 =head1 AUTHOR
37  
38 Mohammad Sajid Anwar, C<< <mohammad.anwar at yahoo.com> >>
39  
40 =head1 REPOSITORY
41  
42 L<https://github.com/manwar/Map-Tube-API>
43  
44 =head1 BUGS
45  
46 Please report any bugs or feature requests to C<bug-map-tube-api at rt.cpan.org>,
47 or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Map-Tube-API>.
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 Map::Tube::API::Exception
56  
57 You can also look for information at:
58  
59 =over 4
60  
61 =item * BUGS / ISSUES
62  
63 L<https://github.com/manwar/Map-Tube-API/issues>
64  
65 =item * AnnoCPAN: Annotated CPAN documentation
66  
67 L<http://annocpan.org/dist/Map-Tube-API>
68  
69 =item * CPAN Ratings
70  
71 L<http://cpanratings.perl.org/d/Map-Tube-API>
72  
73 =item * Search MetaCPAN
74  
75 L<https://metacpan.org/pod/Map::Tube::API>
76  
77 =back
78  
79 =head1 LICENSE AND COPYRIGHT
80  
81 Copyright (C) 2024 - 2025 Mohammad Sajid Anwar.
82  
83 This program is free software; you can redistribute it and/or modify it under
84 the terms of the the Artistic License (2.0). You may obtain a copy of the full
85 license at:
86  
87 L<http://www.perlfoundation.org/artistic_license_2_0>
88  
89 Any use, modification, and distribution of the Standard or Modified Versions is
90 governed by this Artistic License.By using, modifying or distributing the Package,
91 you accept this license. Do not use, modify, or distribute the Package, if you do
92 not accept this license.
93  
94 If your Modified Version has been derived from a Modified Version made by someone
95 other than you,you are nevertheless required to ensure that your Modified Version
96 complies with the requirements of this license.
97  
98 This license does not grant you the right to use any trademark, service mark,
99 tradename, or logo of the Copyright Holder.
100  
101 This license includes the non-exclusive, worldwide, free-of-charge patent license
102 to make, have made, use, offer to sell, sell, import and otherwise transfer the
103 Package with respect to any patent claims licensable by the Copyright Holder that
104 are necessarily infringed by the Package. If you institute patent litigation
105 (including a cross-claim or counterclaim) against any party alleging that the
106 Package constitutes direct or contributory patent infringement,then this Artistic
107 License to you shall terminate on the date that such litigation is filed.
108  
109 Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND
110 CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED
111 WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
112 NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS
113 REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT,
114 INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE
115 OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
116  
117 =cut
118  
119 1 1; # End of Map::Tube::API::Exception
« API/UserAgent.pm ↑ Summary