lib/Sys/Ebpf/Constants/BpfMapUpdateFlags.pm

filter: Statementstmt 95.6% 22 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod n/a totaltotal 93.1% 27 / 29 CC 1 SCAR 0.1
CC
1
Cov
96%
__ANON__
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/Sys/Ebpf/Constants/BpfMapType.pm ↑ Summary lib/Sys/Ebpf/Elf/Constants.pm »
1 package Sys::Ebpf::Constants::BpfMapUpdateFlags;
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 3 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 ▶use Exporter 'import';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 3 my %constants = (
10 'BPF_ANY' => 0, # create new element or update existing
11 'BPF_NOEXIST' => 1, # create new element if it didn't exist
12 'BPF_EXIST' => 2, # update existing element
13 'BPF_F_LOCK' => 4, # spin_lock-ed map_lookup/map_update
14 );
15  
16 3 our @EXPORT_OK = keys %constants;
17 3 our %EXPORT_TAGS = ( all => \@EXPORT_OK );
18  
19 3 for my $name (@EXPORT_OK) {
20 3 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
21 0 ▶ *{$name} = sub () { $constants{$name} };
Subroutine __ANON__: not called CC=1 SCAR=0.4
22 }
23  
24 3 1;
« lib/Sys/Ebpf/Constants/BpfMapType.pm ↑ Summary lib/Sys/Ebpf/Elf/Constants.pm »