| 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
| |||||||||||||||||||||
| 6 | 0 | ▶ | *cbuilder = sub { $_[0]->_cbuilder or die "no C support" }; | ||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||||||||||||
| 7 | } | ||||||||||||||||||||
| 8 | 1 | ▶ | unless(__PACKAGE__->can("have_c_compiler")) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 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
MC/DC0%0/2
$cb && $cb->have_compiler
$cb
$cb->have_compiler
Truth table0%0/3
A && B
A= $cbB= $cb->have_compiler
| |||||||||||||||||||||
| 12 | 0 | }; | |||||||||||||||||||
| 13 | } | ||||||||||||||||||||
| 14 | 1 | ▶ | if($Module::Build::VERSION < 0.33) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 31 | 1 | return $self->SUPER::find_xs_files; | |||||||||||||||||||
| 32 | } | ||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | 1 | 1; | |||||||||||||||||||