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