File Coverage

blib/lib/CloudFlare/Client/Exception/Connection.pm
Criterion Covered Total %
statement 27 27 100.0
branch n/a
condition n/a
subroutine 9 9 100.0
pod n/a
total 36 36 100.0


line stmt bran cond sub pod time code
1             package CloudFlare::Client::Exception::Connection;
2             # ABSTRACT: CloudFlare API Connection Exception
3              
4 5     5   121682 use strict; use warnings; no indirect 'fatal'; use namespace::autoclean;
  5     5   10  
  5     5   169  
  5     5   24  
  5         6  
  5         162  
  5         25  
  5         7  
  5         35  
  5         289  
  5         9  
  5         46  
5 5     5   532 use mro 'c3';
  5         8  
  5         39  
6              
7 5     5   192 use Readonly;
  5         6  
  5         336  
8 5     5   476 use Moose; use MooseX::StrictConstructor;
  5     5   247516  
  5         44  
  5         26951  
  5         15129  
  5         39  
9 5     5   17205 use Types::Standard 'Str';
  5         48414  
  5         59  
10              
11             our $VERSION = 'v0.55.4'; # VERSION
12              
13             extends 'Throwable::Error';
14              
15             has status => (
16             is => 'ro',
17             isa => Str,
18             required => 1,);
19              
20             __PACKAGE__->meta->make_immutable;
21             1; # End of CloudFlare::Client::Exception::Connection
22              
23             __END__
24              
25             =pod
26              
27             =encoding UTF-8
28              
29             =head1 NAME
30              
31             CloudFlare::Client::Exception::Connection - CloudFlare API Connection Exception
32              
33             =head1 VERSION
34              
35             version v0.55.4
36              
37             =head1 SYNOPSIS
38              
39             use CloudFlare::Client::Exception::Connection;
40              
41             CloudFlare::Client::Exception::Connection::->throw(
42             message => 'HTTPS connection failure',
43             status => '404',
44             );
45              
46             my $e = CloudFlare::Client::Exception::Connection::->new(
47             message => 'HTTPS connection failure',
48             status => '404',
49             );
50             $e->throw;
51              
52             =head1 ATTRIBUTES
53              
54             =head2 message
55              
56             The error message thrown upstream, readonly
57              
58             =head2 status
59              
60             The status code for the connection failure, readonly
61              
62             =head1 METHODS
63              
64             =head2 throw
65              
66             On the class, throw a new exception
67              
68             CloudFlare::Client::Exception::Connection::->throw(
69             message => 'HTTPS connection failure',
70             status => '404',
71             );
72             ...
73              
74             On an instance, throw that exception
75              
76             $e->throw;
77              
78             =head2 new
79              
80             Construct a new exception
81              
82             my $e = CloudFlare::Client::Exception::Connection::->throw(
83             message => 'HTTPS connection failure',
84             errorcode => '404',
85             );
86              
87             =head1 SEE ALSO
88              
89             Please see those modules/websites for more information related to this module.
90              
91             =over 4
92              
93             =item *
94              
95             L<CloudFlare::Client|CloudFlare::Client>
96              
97             =back
98              
99             =for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
100              
101             =head1 SUPPORT
102              
103             =head2 Perldoc
104              
105             You can find documentation for this module with the perldoc command.
106              
107             perldoc CloudFlare::Client
108              
109             =head2 Websites
110              
111             The following websites have more information about this module, and may be of help to you. As always,
112             in addition to those websites please use your favorite search engine to discover more resources.
113              
114             =over 4
115              
116             =item *
117              
118             MetaCPAN
119              
120             A modern, open-source CPAN search engine, useful to view POD in HTML format.
121              
122             L<http://metacpan.org/release/CloudFlare-Client>
123              
124             =back
125              
126             =head2 Email
127              
128             You can email the author of this module at C<me+dev@peter-r.co.uk> asking for help with any problems you have.
129              
130             =head2 Source Code
131              
132             The code is open to the world, and available for you to hack on. Please feel free to browse it and play
133             with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
134             from your repository :)
135              
136             L<https://github.com/pwr22/cloudflare-client>
137              
138             git clone git://github.com/pwr22/cloudflare-client.git
139              
140             =head1 BUGS
141              
142             Please report any bugs or feature requests on the bugtracker website
143             https://github.com/pwr22/cloudflare-client/issues
144              
145             When submitting a bug or request, please include a test-file or a
146             patch to an existing test-file that illustrates the bug or desired
147             feature.
148              
149             =head1 AUTHOR
150              
151             Peter Roberts <me+dev@peter-r.co.uk>
152              
153             =head1 COPYRIGHT AND LICENSE
154              
155             This software is Copyright (c) 2016 by Peter Roberts.
156              
157             This is free software, licensed under:
158              
159             The MIT (X11) License
160              
161             =cut