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 27 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 27 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 27 ▶use Unblock::HTTP3 ();
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 27 our $VERSION = '0.14';
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 26 ▶sub client {
Subroutine client: called CC=8 SCAR=20.8
Pod undocumented
20 my (
21 26 $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 26 ▶ $max_field_section_size = 65_536
Branch: 1 branch
BranchTrueFalseTotal
unless defined $max_field_section_size 9 17 26
30 unless defined $max_field_section_size;
31 26 ▶ $qpack_max_table_capacity = 4_096
Branch: 1 branch
BranchTrueFalseTotal
unless defined $qpack_max_table_capacity 9 17 26
32 unless defined $qpack_max_table_capacity;
33 26 ▶ $qpack_blocked_streams = 100
Branch: 1 branch
BranchTrueFalseTotal
unless defined $qpack_blocked_streams 9 17 26
34 unless defined $qpack_blocked_streams;
35 26 ▶ $enable_connect_protocol = 0
Branch: 1 branch
BranchTrueFalseTotal
unless defined $enable_connect_protocol 10 16 26
36 unless defined $enable_connect_protocol;
37 26 ▶ $h3_datagram = 0
Branch: 1 branch
BranchTrueFalseTotal
unless defined $h3_datagram 10 16 26
38 unless defined $h3_datagram;
39  
40 26 ▶ return _new_client(
Branch: 2 branches
BranchTrueFalseTotal
$enable_connect_protocol ? : 0 26 26
$h3_datagram ? : 6 20 26
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 40 ▶sub server {
Subroutine server: called CC=8 SCAR=20.8
Pod undocumented
50 my (
51 40 $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 40 ▶ $max_field_section_size = 65_536
Branch: 1 branch
BranchTrueFalseTotal
unless defined $max_field_section_size 23 17 40
61 unless defined $max_field_section_size;
62 40 ▶ $qpack_max_table_capacity = 4_096
Branch: 1 branch
BranchTrueFalseTotal
unless defined $qpack_max_table_capacity 23 17 40
63 unless defined $qpack_max_table_capacity;
64 40 ▶ $qpack_blocked_streams = 100
Branch: 1 branch
BranchTrueFalseTotal
unless defined $qpack_blocked_streams 23 17 40
65 unless defined $qpack_blocked_streams;
66 40 ▶ $enable_connect_protocol = 0
Branch: 1 branch
BranchTrueFalseTotal
unless defined $enable_connect_protocol 24 16 40
67 unless defined $enable_connect_protocol;
68 40 ▶ $h3_datagram = 0
Branch: 1 branch
BranchTrueFalseTotal
unless defined $h3_datagram 24 16 40
69 unless defined $h3_datagram;
70  
71 40 ▶ return _new_server(
Branch: 2 branches
BranchTrueFalseTotal
$enable_connect_protocol ? : 6 34 40
$h3_datagram ? : 4 36 40
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 27 1;
« blib/lib/Unblock/HTTP3/Transaction.pm ↑ Summary blib/lib/Unblock/HTTP3/Capsule.pm »