| 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=4 SCAR=15.6
Pod
undocumented
| |||||||||||||||||||||||||||||
| 30 | 1 | ▶ | return {} unless $self->have_c_compiler; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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
Condition33%1/3
"$]" < "5.012" and $^O eq "MSWin32"
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"
| |||||||||||||||||||||||||||||
| 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
| |||||||||||||||||||||||||||||
| 40 | # need PERL_CORE for working SAVEHINTS() | ||||||||||||||||||||||||||||
| 41 | 0 | ▶ | $args{defines} = { %{$args{defines} || {}}, | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 42 | PERL_CORE => 1, | ||||||||||||||||||||||||||||
| 43 | }; | ||||||||||||||||||||||||||||
| 44 | } | ||||||||||||||||||||||||||||
| 45 | 1 | return $self->SUPER::compile_c($file, %args); | |||||||||||||||||||||||||||
| 46 | } | ||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||
| 48 | 1 | 1; | |||||||||||||||||||||||||||