_build/lib/MyModuleBuilder.pm

filter: Statementstmt 65.3% 49 / 75 Branchbran 29.4% 10 / 34 Conditioncond 12.5% 1 / 8 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 75.0% 6 / 8 Podpod 0.0% 0 / 4 totaltotal 49.6% 66 / 133 SCAR 42.8
CC
21
Cov
51%
probed_info
31.3
compile_c
27.0
__ANON__
6.0
CRAP 72.0
↑ 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 sub compile_xs {
9 0 ▶ my($self, $file, %args) = @_;
Subroutine compile_xs: not called CC=1 SCAR=6.9
Pod undocumented
10 0 require ExtUtils::ParseXS;
11 0 ExtUtils::ParseXS->VERSION(3.30);
12 0 return $self->SUPER::compile_xs($file, %args);
13 }
14 sub probed_info {
15 2 ▶ my($self) = @_;
Subroutine probed_info: called CC=8 SCAR=34.4
Pod undocumented
16 2 my $feat_file = $self->localize_file_path("lib/Hash/features");
17 2 my $probe_file = $self->localize_file_path(
18 "lib/Hash/features.probe");
19 2 ▶ unless($self->up_to_date($probe_file, $feat_file)) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->up_to_date($probe_file, $feat_file)) 0 2 2
20 0 require IO::File;
21 0 require Data::Dumper;
22 0 ▶ my $probe = do("./$probe_file") or
Branch: 1 branch
BranchTrueFalseTotal
my $probe = do "./$probe_file" or die $@ || "can't read ${probe_file}: $!" 0 0 0
Condition0%0/2
$@ || "can't read ${probe_file}: $!"
l!l
00
MC/DC0%0/1
$@ || "can't read ${probe_file}: $!"
$@
Truth table0%0/2
A
A= $@
Aresult
11
00
23 die $@ || "can't read $probe_file: $!";
24 0 my $feat_defs = $probe->($self);
25 0 $self->add_to_cleanup($feat_file);
26 0 ▶ my $feat_fh = IO::File->new($feat_file, "w")
Branch: 1 branch
BranchTrueFalseTotal
my $feat_fh = "IO::File"->new($feat_file, "w") or die "can't write ${feat_file}: $!" 0 0 0
27 or die "can't write $feat_file: $!";
28 0 local $Data::Dumper::Terse = 1;
29 0 ▶ $feat_fh->printflush(Data::Dumper::Dumper($feat_defs))
Branch: 1 branch
BranchTrueFalseTotal
$feat_fh->printflush(Data::Dumper::Dumper($feat_defs)) or die "can't write ${feat_file}: $!" 0 0 0
30 or die "can't write $feat_file: $!";
31 }
32 2 ▶ my $probed_info = do("./$feat_file") or
Branch: 1 branch
BranchTrueFalseTotal
my $probed_info = do "./$feat_file" or die $@ || "can't read ${feat_file}: $!" 0 2 2
Condition0%0/2
$@ || "can't read ${feat_file}: $!"
l!l
00
MC/DC0%0/1
$@ || "can't read ${feat_file}: $!"
$@
Truth table0%0/2
A
A= $@
Aresult
11
00
33 die $@ || "can't read $feat_file: $!";
34 2 return ($probed_info, $feat_file);
35 }
36 sub compile_c {
37 1 ▶ my($self, $file, %args) = @_;
Subroutine compile_c: called CC=9 SCAR=32.9
Pod undocumented
38 1 my $cc0_h =
39 $self->localize_file_path("lib/Hash/callchecker0.h");
40 1 ▶ unless(-f $cc0_h) {
Branch: 1 branch
BranchTrueFalseTotal
unless (-f $cc0_h) 0 1 1
41 0 ▶ my $content = eval {
Condition0%0/2
eval { do { local $SIG{'__DIE__'}; require Devel::CallChecker; 'Devel::CallChecker'->VERSION(0.003); &Devel::CallChecker::callchecker0_h() } } || ''
l!l
00
MC/DC0%0/1
eval { do { local $SIG{'__DIE__'}; require Devel::CallChecker; 'Devel::CallChecker'->VERSION(0.003); &Devel::CallChecker::callchecker0_h() } } || ''
eval { do { local $SIG{'__DIE__'}; require Devel::CallChecker; 'Devel::CallChecker'->VERSION(0.003); &Devel::CallChecker::callchecker0_h() } }
Truth table0%0/2
A
A= eval { do { local $SIG{'__DIE__'}; require Devel::CallChecker; 'Devel::CallChecker'->VERSION(0.003); &Devel::CallChecker::callchecker0_h() } }
Aresult
11
00
42 0 local $SIG{__DIE__};
43 0 require Devel::CallChecker;
44 0 Devel::CallChecker->VERSION(0.003);
45 0 &Devel::CallChecker::callchecker0_h();
46 } || "";
47 0 $self->add_to_cleanup($cc0_h);
48 0 require IO::File;
49 0 ▶ my $fh = IO::File->new($cc0_h, "w") or die $!;
Branch: 1 branch
BranchTrueFalseTotal
my $fh = "IO::File"->new($cc0_h, "w") or die $! 0 0 0
50 0 ▶ $fh->printflush($content) or die $!;
Branch: 1 branch
BranchTrueFalseTotal
$fh->printflush($content) or die $! 0 0 0
51 0 ▶ $fh->close or die $!;
Branch: 1 branch
BranchTrueFalseTotal
$fh->close or die $! 0 0 0
52 }
53 1 ▶ unless($args{no_feature_defs}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($args{"no_feature_defs"}) 1 0 1
54 1 my($probed, $probed_file) = $self->probed_info;
55 $args{defines} = {
56 1 ▶ %{$args{defines} || {}},
Branch: 1 branch
BranchTrueFalseTotal
$args{"defines"} or {} 0 1 1
57 1 %{$probed->{defs}},
58 QWITH_TALLY => 1,
59 };
60 1 $obj_file = $self->cbuilder->object_file($file);
61 1 ▶ unless($self->up_to_date($probed_file, $obj_file)) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->up_to_date($probed_file, $obj_file)) 0 1 1
62 0 unlink $obj_file;
63 }
64 }
65 1 return $self->SUPER::compile_c($file, %args);
66 }
67 sub link_c {
68 1 ▶ no strict "refs";
Subroutine BEGIN: called CC=1 SCAR=0.0
69 1 ▶ my($self, $spec) = @_;
Subroutine link_c: called CC=2 SCAR=7.0
Pod undocumented
70 1 my($probed, $probed_file) = $self->probed_info;
71 1 ▶ unless($self->up_to_date($probed_file, $spec->{lib_file})) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->up_to_date($probed_file, $spec->{"lib_file"})) 0 1 1
72 0 unlink $spec->{lib_file};
73 }
74 1 my $cb = $self->cbuilder;
75 1 my $cbclass = ref($cb);
76 1 my $orig_cb_link = $cb->can("link");
77 1 local *{"${cbclass}::link"} = sub {
78 1 ▶ my($self, %args) = @_;
Subroutine __ANON__: called CC=4 SCAR=14.0
79 1 ▶ if($args{module_name} eq "Hash::SharedMem") {
Branch: 1 branch
BranchTrueFalseTotal
if ($args{"module_name"} eq "Hash::SharedMem") 1 0 1
80 1 ▶ my $cc_linkables = eval {
Condition50%1/2
eval { do { local $SIG{'__DIE__'}; require Devel::CallChecker; 'Devel::CallChecker'->VERSION(0.003); [&Devel::CallChecker::callchecker_linkable] } } || []
l!l
10
MC/DC0%0/1
eval { do { local $SIG{'__DIE__'}; require Devel::CallChecker; 'Devel::CallChecker'->VERSION(0.003); [&Devel::CallChecker::callchecker_linkable] } } || []
eval { do { local $SIG{'__DIE__'}; require Devel::CallChecker; 'Devel::CallChecker'->VERSION(0.003); [&Devel::CallChecker::callchecker_linkable] } }
Truth table50%1/2
A
A= eval { do { local $SIG{'__DIE__'}; require Devel::CallChecker; 'Devel::CallChecker'->VERSION(0.003); [&Devel::CallChecker::callchecker_linkable] } }
Aresult
11
00
81 1 local $SIG{__DIE__};
82 1 require Devel::CallChecker;
83 1 Devel::CallChecker->VERSION(0.003);
84 1 [&Devel::CallChecker::callchecker_linkable];
85 } || [];
86 $args{objects} = [
87 1 @{$args{objects}},
88 @$cc_linkables,
89 ];
90 }
91 $args{extra_linker_flags} = [
92 1 ▶ @{$args{extra_linker_flags} || []},
Branch: 1 branch
BranchTrueFalseTotal
$args{"extra_linker_flags"} or [] 0 1 1
93 1 @{$probed->{libs}},
94 ];
95 1 @_ = ($self, %args);
96 1 goto &$orig_cb_link;
97 1 };
98 1 $self->SUPER::link_c($spec);
99 }
100  
101 1 1;
↑ Summary Build »