_build/lib/MyModuleBuilder.pm

filter: Statementstmt 57.6% 15 / 26 Branchbran 37.5% 6 / 16 Conditioncond 16.6% 1 / 6 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 50.0% 3 / 6 Podpod 0.0% 0 / 2 totaltotal 41.6% 25 / 60 CC 8 SCAR 15.2
CC
8
Cov
46%
__ANON__
6.0
__ANON__
6.0
find_xs_files
4.8
CRAP 4.6
« blib/lib/Lexical/SealRequireHints.pm ↑ Summary Build »
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=4 SCAR=15.6
Pod undocumented
30 1 ▶ return {} unless $self->have_c_compiler;
Branch: 1 branch
BranchTrueFalseTotal
unless $self->have_c_compiler 0 1 1
31 # On MSWin32, the XS version of the workaround can't work
32 # properly, because it doesn't have access to the core
33 # symbols to let SAVEHINTS() work.
34 1 ▶ return {} if "$]" < 5.012 && $^O eq "MSWin32";
Branch: 1 branch
BranchTrueFalseTotal
if "$]" < "5.012" and $^O eq "MSWin32" 0 1 1
Condition33%1/3
"$]" < "5.012" and $^O eq "MSWin32"
!ll&&!rl&&r
100
MC/DC0%0/2
"$]" < "5.012" and $^O eq "MSWin32"
"$]" < "5.012" $^O eq "MSWin32"
Truth table33%1/3
A and B
A= "$]" < "5.012"B= $^O eq "MSWin32"
ABresult
0X0
100
111
35 1 return $self->SUPER::find_xs_files;
36 }
37 sub compile_c {
38 1 ▶ my($self, $file, %args) = @_;
Subroutine compile_c: called CC=3 SCAR=15.1
Pod undocumented
39 1 ▶ if("$]" < 5.012) {
Branch: 1 branch
BranchTrueFalseTotal
if ("$]" < "5.012") 0 1 1
40 # need PERL_CORE for working SAVEHINTS()
41 0 ▶ $args{defines} = { %{$args{defines} || {}},
Branch: 1 branch
BranchTrueFalseTotal
$args{"defines"} or {} 0 0 0
42 PERL_CORE => 1,
43 };
44 }
45 1 return $self->SUPER::compile_c($file, %args);
46 }
47  
48 1 1;
« blib/lib/Lexical/SealRequireHints.pm ↑ Summary Build »