File Coverage

blib/lib/Dancer2/Plugin/Map/Tube/Error.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 15 15 100.0


line stmt bran cond sub pod time code
1             package Dancer2::Plugin::Map::Tube::Error;
2              
3             $Dancer2::Plugin::Map::Tube::Error::VERSION = '0.04';
4             $Dancer2::Plugin::Map::Tube::Error::AUTHORITY = 'cpan:MANWAR';
5              
6             =head1 NAME
7              
8             Dancer2::Plugin::Map::Tube::Error - Error codes for Map::Tube API.
9              
10             =head1 VERSION
11              
12             Version 0.04
13              
14             =cut
15              
16 1     1   15 use 5.006;
  1         4  
17 1     1   5 use strict; use warnings;
  1     1   1  
  1         32  
  1         4  
  1         1  
  1         57  
18 1     1   3 use parent 'Exporter';
  1         1  
  1         9  
19              
20             our @EXPORT = qw(
21             $BAD_REQUEST
22             $TOO_MANY_REQUEST
23              
24             $MEMCACHE_SERVER_ERROR
25             $MEMCACHE_SERVER_UNREACHABLE
26              
27             $REACHED_REQUEST_LIMIT
28              
29             $MISSING_MAP_NAME
30             $RECEIVED_INVALID_MAP_NAME
31             $RECEIVED_UNSUPPORTED_MAP_NAME
32              
33             $MISSING_START_STATION_NAME
34             $RECEIVED_INVALID_START_STATION_NAME
35              
36             $MISSING_END_STATION_NAME
37             $RECEIVED_INVALID_END_STATION_NAME
38              
39             $MISSING_LINE_NAME
40             $RECEIVED_INVALID_LINE_NAME
41              
42             $MAP_NOT_INSTALLED
43             );
44              
45             =head1 DESCRIPTION
46              
47             =head1 ERROR MESSAGES
48              
49             =over 2
50              
51             =item MEMCACHE SERVER UNREACHABLE
52              
53             =item REACHED REQUEST LIMIT
54              
55             =item MISSING MAP NAME
56              
57             =item RECEIVED INVALID MAP NAME
58              
59             =item RECEIVED UNSUPPORTED MAP NAME
60              
61             =item MISSING START STATION NAME
62              
63             =item RECEIVED INVALID START STATION NAME
64              
65             =item MISSING END STATION NAME
66              
67             =item RECEIVED INVALID END STATION NAME
68              
69             =item MISSING LINE NAME
70              
71             =item RECEIVED INVALID LINE NAME
72              
73             =item MAP NOT INSTALLED
74              
75             =back
76              
77             =cut
78              
79             our $BAD_REQUEST = 400;
80             our $TOO_MANY_REQUEST = 429;
81             our $MEMCACHE_SERVER_ERROR = 430;
82              
83             our $MEMCACHE_SERVER_UNREACHABLE = 'Memcache server is unreachable.';
84             our $REACHED_REQUEST_LIMIT = 'Reached request limit.';
85             our $MISSING_MAP_NAME = 'Missing map name.';
86             our $RECEIVED_INVALID_MAP_NAME = 'Received invalid map name.';
87             our $RECEIVED_UNSUPPORTED_MAP_NAME = 'Received unsupported map name.';
88             our $MISSING_START_STATION_NAME = 'Missing start station name.';
89             our $RECEIVED_INVALID_START_STATION_NAME = 'Received invalid start station name.';
90             our $MISSING_END_STATION_NAME = 'Missing end station name.';
91             our $RECEIVED_INVALID_END_STATION_NAME = 'Received invalid end station name.';
92             our $MISSING_LINE_NAME = 'Missing line name.';
93             our $RECEIVED_INVALID_LINE_NAME = 'Received invalid line name.';
94             our $MAP_NOT_INSTALLED = 'Map not installed';
95              
96             =head1 AUTHOR
97              
98             Mohammad Sajid Anwar, C<< >>
99              
100             =head1 REPOSITORY
101              
102             L
103              
104             =head1 BUGS
105              
106             Please report any bugs or feature requests through the web interface at L.
107             I will be notified and then you'll automatically be notified of progress on your
108             bug as I make changes.
109              
110             =head1 SUPPORT
111              
112             You can find documentation for this module with the perldoc command.
113              
114             perldoc Dancer2::Plugin::Map::Tube::Error
115              
116             You can also look for information at:
117              
118             =over 4
119              
120             =item * BUGS / ISSUES
121              
122             L
123              
124             =item * AnnoCPAN: Annotated CPAN documentation
125              
126             L
127              
128             =item * CPAN Ratings
129              
130             L
131              
132             =item * Search MetaCPAN
133              
134             L
135              
136             =back
137              
138             =head1 LICENSE AND COPYRIGHT
139              
140             Copyright (C) 2024 Mohammad Sajid Anwar.
141              
142             This program is free software; you can redistribute it and / or modify it under
143             the terms of the the Artistic License (2.0). You may obtain a copy of the full
144             license at:
145              
146             L
147              
148             Any use, modification, and distribution of the Standard or Modified Versions is
149             governed by this Artistic License.By using, modifying or distributing the Package,
150             you accept this license. Do not use, modify, or distribute the Package, if you do
151             not accept this license.
152              
153             If your Modified Version has been derived from a Modified Version made by someone
154             other than you,you are nevertheless required to ensure that your Modified Version
155             complies with the requirements of this license.
156              
157             This license does not grant you the right to use any trademark, service mark,
158             tradename, or logo of the Copyright Holder.
159              
160             This license includes the non-exclusive, worldwide, free-of-charge patent license
161             to make, have made, use, offer to sell, sell, import and otherwise transfer the
162             Package with respect to any patent claims licensable by the Copyright Holder that
163             are necessarily infringed by the Package. If you institute patent litigation
164             (including a cross-claim or counterclaim) against any party alleging that the
165             Package constitutes direct or contributory patent infringement,then this Artistic
166             License to you shall terminate on the date that such litigation is filed.
167              
168             Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND
169             CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED
170             WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
171             NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS
172             REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT,
173             INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE
174             OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
175              
176             =cut
177              
178             1; # End of Dancer2::Plugin::Map::Tube::Error