HTTP2.pm untested

filter: Statementstmt 0.0% 0 / 7 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 9 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Net::HTTP2;
2  
3 use strict;
4 use warnings;
5  
6 our $VERSION = '0.02';
7  
8 =encoding utf-8
9  
10 =head1 NAME
11  
12 Net::HTTP2 - HTTP/2 in Perl, simplified.
13  
14 =head1 SYNOPSIS
15  
16 See L<Net::HTTP2::Client::Mojo>.
17  
18 =head1 DESCRIPTION
19  
20 This distribution wraps L<Protocol::HTTP2> to
21 simplify use of L<HTTP/2|https://www.rfc-editor.org/rfc/rfc9113> in
22 Perl.
23  
24 See L<Net::HTTP2::Client> for the client interface.
25  
26 (This class itself exposes no code; it’s just here as generic documentation
27 for the distribution.)
28  
29 =head1 STATUS
30  
31 This module is experimental. Interface changes may still happen,
32 and error handling may not be all up to snuff. Please file bug reports
33 as appropriate.
34  
35 =head1 EVENT LOOPS/ABSTRACTIONS
36  
37 HTTP/2 fits most naturally into non-blocking (rather than blocking) I/O;
38 hence, this module requires use of an event loop. To ensure broad
39 compatibility, this library supports multiple event loop abstractions.
40 Currently L<AnyEvent>, L<IO::Async>, and L<Mojolicious> are supported.
41  
42 =head1 TLS
43  
44 Since the major web browsers require TLS for HTTP/2, this library does, too.
45 Thus, this library needs L<Net::SSLeay>, and it must link to an
46 L<OpenSSL|https://openssl.org> that supports ALPN or NPN.
47  
48 (NB: Otherwise, this module and its non-core dependency tree are pure Perl!)
49  
50 If there’s a need for unencrypted HTTP/2, it can be added easily enough.
51  
52 =head1 CHARACTER ENCODING
53  
54 Unless otherwise noted, all strings into & out of this library
55 are byte strings.
56  
57 =head1 ERROR HANDLING
58  
59 Most thrown errors are L<Net::HTTP2::X::Base> instances.
60  
61 =head1 SEE ALSO
62  
63 =over
64  
65 =item * L<Shuvgey> is an HTTP/2 server. Like this module it wraps
66 L<Protocol::HTTP2>, but it targets a more specific use case.
67  
68 =item * L<Net::Curl::Easier> offers another path to HTTP/2 in Perl as long
69 as your system’s L<curl|https://curl.se> supports it.
70  
71 =item * L<HTTP::Tiny> comes with Perl and exposes a simple interface for
72 running HTTP/1 queries.
73  
74 =back
75  
76 =cut
77  
78 =head1 LICENSE & COPYRIGHT
79  
80 Copyright 2022 Gasper Software Consulting. All rights reserved.
81  
82 Net::HTTP2 is licensed under the same terms as Perl itself (cf.
83 L<perlartistic>).
84  
85 =cut
86  
87 1;