blib/lib/Unblock/HTTP1/NativeABI.pm

filter: Statementstmt 100% 45 / 45 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 15 / 15 Podpod 0.0% 0 / 4 totaltotal 91.1% 62 / 68 CC 3 SCAR 3.1
CC
3
Cov
96%
c_header
3.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« blib/lib/Unblock/HTTP1/Transaction.pm ↑ Summary vendor/picohttpparser/picohttpparser.c »
1 package Unblock::HTTP1::NativeABI;
2  
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 3 ▶use File::Basename qw(dirname);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 3 ▶use File::Spec ();
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 3 ▶use Unblock::HTTP1 ();
Subroutine BEGIN: called CC=1 SCAR=0.0
10 3 ▶use Unblock::HTTP1::_Native ();
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 3 our $VERSION = $Unblock::HTTP1::VERSION;
13  
14 3 ▶use constant ABI_VERSION => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 3 ▶use constant INPUT_OK => 0;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 3 ▶use constant INPUT_MORE => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 3 ▶use constant INPUT_CLOSED => 3;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 3 ▶use constant INPUT_SWITCH => 4;
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 3 my $include_dir = File::Spec->catdir(
21 dirname(__FILE__),
22 'NativeABI',
23 );
24  
25 1 ▶sub native_include_dir {
Subroutine native_include_dir: called CC=1 SCAR=0.0
Pod undocumented
26 1 return $include_dir;
27 }
28  
29 3 ▶sub header_path {
Subroutine header_path: called CC=1 SCAR=0.0
Pod undocumented
30 3 return File::Spec->catfile(
31 $include_dir,
32 'unblock_http1_native_abi.h',
33 );
34 }
35  
36 2 ▶sub c_header {
Subroutine c_header: called CC=3 SCAR=11.2
Pod undocumented
37 2 my $path = header_path();
38  
39 2 ▶ open my $fh, '<', $path
Branch: 1 branch
BranchTrueFalseTotal
open my $fh, "<", $path or die "could not read ${path}: $!" 2 0 2
40 or die "could not read $path: $!";
41  
42 2 local $/;
43 2 my $header = <$fh>;
44  
45 2 ▶ close $fh
Branch: 1 branch
BranchTrueFalseTotal
close $fh or die "could not close ${path}: $!" 2 0 2
46 or die "could not close $path: $!";
47  
48 2 return $header;
49 }
50  
51 1 ▶sub definition {
Subroutine definition: called CC=1 SCAR=0.0
Pod undocumented
52 return {
53 1 provider => \&Unblock::HTTP1::_Native::_borrowed_input_operations_address,
54 abi_version => ABI_VERSION,
55 struct_size =>
56 Unblock::HTTP1::_Native::_borrowed_input_operations_size(),
57 operations_address =>
58 Unblock::HTTP1::_Native::_borrowed_input_operations_address(),
59 };
60 }
61  
62 3 1;
63  
64 __END__
« blib/lib/Unblock/HTTP1/Transaction.pm ↑ Summary vendor/picohttpparser/picohttpparser.c »