_build/lib/MyModuleBuilder.pm

filter: Statementstmt 55.0% 11 / 20 Branchbran 40.0% 4 / 10 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 40.0% 2 / 5 Podpod 0.0% 0 / 1 totaltotal 41.4% 17 / 41 CC 4 SCAR 13.6
CC
4
Cov
45%
__ANON__
6.0
__ANON__
6.0
find_xs_files
2.0
CRAP 3.9
« Build ↑ Summary
1 package MyModuleBuilder;
2 1 ▶use Module::Build;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 our @ISA = qw(Module::Build);
4  
5 1 ▶ unless(__PACKAGE__->can("cbuilder")) {
Branch: 1 branch
BranchTrueFalseTotal
unless (__PACKAGE__->can("cbuilder")) 0 1 1
6 0 ▶ *cbuilder = sub { $_[0]->_cbuilder or die "no C support" };
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
$_[0]->_cbuilder or die "no C support" 0 0 0
7 }
8 1 ▶ unless(__PACKAGE__->can("have_c_compiler")) {
Branch: 1 branch
BranchTrueFalseTotal
unless (__PACKAGE__->can("have_c_compiler")) 0 1 1
9 *have_c_compiler = sub {
10 0 ▶ my $cb = eval { $_[0]->cbuilder };
Subroutine __ANON__: not called CC=2 SCAR=17.9
11 0 ▶ return $cb && $cb->have_compiler;
Condition0%0/3
$cb && $cb->have_compiler
!ll&&!rl&&r
000
MC/DC0%0/2
$cb && $cb->have_compiler
$cb $cb->have_compiler
Truth table0%0/3
A && B
A= $cbB= $cb->have_compiler
ABresult
0X0
100
111
12 0 };
13 }
14 1 ▶ if($Module::Build::VERSION < 0.33) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Module::Build::VERSION < "0.33") 0 1 1
15 # Older versions of Module::Build have a bug where if the
16 # cbuilder object is used at Build.PL time (which it will
17 # be for this distribution due to the logic in
18 # ->find_xs_files) then that object can be dumped to the
19 # build_params file, and then at Build time it will
20 # attempt to use the dumped blessed object without loading
21 # the ExtUtils::CBuilder class that is needed to make it
22 # work.
23 *write_config = sub {
24 0 ▶ delete $_[0]->{properties}->{_cbuilder};
Subroutine __ANON__: not called CC=1 SCAR=6.9
25 0 return $_[0]->SUPER::write_config;
26 0 };
27 }
28 sub find_xs_files {
29 1 ▶ my($self) = @_;
Subroutine find_xs_files: called CC=2 SCAR=7.1
Pod undocumented
30 1 ▶ return {} unless $self->have_c_compiler;
Branch: 1 branch
BranchTrueFalseTotal
unless $self->have_c_compiler 0 1 1
31 1 return $self->SUPER::find_xs_files;
32 }
33  
34 1 1;
« Build ↑ Summary