blib/lib/Unblock/HTTP3/_Native.pm

filter: Statementstmt 100% 28 / 28 Branchbran 96.4% 27 / 28 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 4 totaltotal 92.5% 62 / 67 CC 15 SCAR 18.5
CC
15
Cov
98%
client
8.0
server
8.0
BEGIN
1.0
CRAP 6.3
« blib/lib/Unblock/HTTP3/Transaction.pm ↑ Summary blib/lib/Unblock/HTTP3/Capsule.pm »
1 package Unblock::HTTP3::_Native;
2  
3 22 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 22 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 22 ▶use Unblock::HTTP3 ();
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 22 our $VERSION = '0.12';
9  
10 1 ▶sub nghttp3_version {
Subroutine nghttp3_version: called CC=1 SCAR=0.0
Pod undocumented
11 1 return _nghttp3_version();
12 }
13  
14 6 ▶sub parse_priority {
Subroutine parse_priority: called CC=1 SCAR=0.0
Pod undocumented
15 6 my ($class, $value) = @_;
16 6 return _parse_priority($value);
17 }
18  
19 23 ▶sub client {
Subroutine client: called CC=8 SCAR=20.8
Pod undocumented
20 my (
21 23 $class,
22 $max_field_section_size,
23 $qpack_max_table_capacity,
24 $qpack_blocked_streams,
25 $enable_connect_protocol,
26 $h3_datagram,
27 ) = @_;
28  
29 23 ▶ $max_field_section_size = 65_536
Branch: 1 branch
BranchTrueFalseTotal
unless defined $max_field_section_size 8 15 23
30 unless defined $max_field_section_size;
31 23 ▶ $qpack_max_table_capacity = 4_096
Branch: 1 branch
BranchTrueFalseTotal
unless defined $qpack_max_table_capacity 8 15 23
32 unless defined $qpack_max_table_capacity;
33 23 ▶ $qpack_blocked_streams = 100
Branch: 1 branch
BranchTrueFalseTotal
unless defined $qpack_blocked_streams 8 15 23
34 unless defined $qpack_blocked_streams;
35 23 ▶ $enable_connect_protocol = 0
Branch: 1 branch
BranchTrueFalseTotal
unless defined $enable_connect_protocol 9 14 23
36 unless defined $enable_connect_protocol;
37 23 ▶ $h3_datagram = 0
Branch: 1 branch
BranchTrueFalseTotal
unless defined $h3_datagram 9 14 23
38 unless defined $h3_datagram;
39  
40 23 ▶ return _new_client(
Branch: 2 branches
BranchTrueFalseTotal
$enable_connect_protocol ? : 0 23 23
$h3_datagram ? : 6 17 23
41 $max_field_section_size,
42 $qpack_max_table_capacity,
43 $qpack_blocked_streams,
44 $enable_connect_protocol ? 1 : 0,
45 $h3_datagram ? 1 : 0,
46 );
47 }
48  
49 38 ▶sub server {
Subroutine server: called CC=8 SCAR=20.8
Pod undocumented
50 my (
51 38 $class,
52 $max_field_section_size,
53 $qpack_max_table_capacity,
54 $qpack_blocked_streams,
55 $enable_connect_protocol,
56 $h3_datagram,
57 $origin_list,
58 ) = @_;
59  
60 38 ▶ $max_field_section_size = 65_536
Branch: 1 branch
BranchTrueFalseTotal
unless defined $max_field_section_size 23 15 38
61 unless defined $max_field_section_size;
62 38 ▶ $qpack_max_table_capacity = 4_096
Branch: 1 branch
BranchTrueFalseTotal
unless defined $qpack_max_table_capacity 23 15 38
63 unless defined $qpack_max_table_capacity;
64 38 ▶ $qpack_blocked_streams = 100
Branch: 1 branch
BranchTrueFalseTotal
unless defined $qpack_blocked_streams 23 15 38
65 unless defined $qpack_blocked_streams;
66 38 ▶ $enable_connect_protocol = 0
Branch: 1 branch
BranchTrueFalseTotal
unless defined $enable_connect_protocol 24 14 38
67 unless defined $enable_connect_protocol;
68 38 ▶ $h3_datagram = 0
Branch: 1 branch
BranchTrueFalseTotal
unless defined $h3_datagram 24 14 38
69 unless defined $h3_datagram;
70  
71 38 ▶ return _new_server(
Branch: 2 branches
BranchTrueFalseTotal
$enable_connect_protocol ? : 5 33 38
$h3_datagram ? : 4 34 38
72 $max_field_section_size,
73 $qpack_max_table_capacity,
74 $qpack_blocked_streams,
75 $enable_connect_protocol ? 1 : 0,
76 $h3_datagram ? 1 : 0,
77 $origin_list,
78 );
79 }
80  
81 22 1;
« blib/lib/Unblock/HTTP3/Transaction.pm ↑ Summary blib/lib/Unblock/HTTP3/Capsule.pm »