blib/lib/Data/BitSet/Shared.pm

filter: Statementstmt 94.7% 18 / 19 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 0.0% 0 / 1 totaltotal 89.2% 25 / 28 CC 2 SCAR 3.6
CC
2
Cov
95%
CLONE_SKIP
2.0
set_bits
2.0
BEGIN
1.0
CRAP 1.4
↑ Summary Shared.xs »
1 package Data::BitSet::Shared;
2 9 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 9 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 9 our $VERSION = '0.09';
5 9 require XSLoader;
6 9 XSLoader::load('Data::BitSet::Shared', $VERSION);
7  
8 0 ▶sub CLONE_SKIP { 1 } # blessed C-pointer handle: never clone into ithreads (double-free)
Subroutine CLONE_SKIP: not called CC=1 SCAR=6.9
9  
10 use overload
11 9 ▶ '""' => \&to_string,
Subroutine BEGIN: called CC=1 SCAR=0.0
12 3 ▶ 'bool' => sub { 1 },
Subroutine __ANON__: called CC=1 SCAR=0.0
13 9 fallback => 1;
14  
15 77 ▶sub set_bits {
Subroutine set_bits: called CC=2 SCAR=6.9
Pod undocumented
16 # Not goto &_set_bits: that reuses the context frame, so the XSUB's GIMME_V
17 # reads G_VOID on perls before 5.38 and it pushes nothing at all.
18 77 ▶ return _set_bits(@_) if ref($_[0]) eq __PACKAGE__;
Branch: 1 branch
BranchTrueFalseTotal
if ref $_[0] eq __PACKAGE__ 75 2 77
19 2 my ($self) = @_;
20 2 grep { $self->test($_) } 0 .. $self->capacity - 1;
21 }
22  
23 9 1;
24 __END__
↑ Summary Shared.xs »