| 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 | sub compile_c { | ||||||||||||||||||||
| 34 | 1 | ▶ | require Data::Float; | ||||||||||||||||||
|
Subroutine
compile_c: called CC=3 SCAR=11.1
Pod
undocumented
| |||||||||||||||||||||
| 35 | 1 | Data::Float->VERSION("0.008"); | |||||||||||||||||||
| 36 | 1 | require Data::Integer; | |||||||||||||||||||
| 37 | 1 | Data::Integer->VERSION("0.001"); | |||||||||||||||||||
| 38 | 1 | my($self, $file, %args) = @_; | |||||||||||||||||||
| 39 | 1 | ▶ | $args{defines} = { %{$args{defines} || {}}, | ||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||
| 40 | Q_HAVE_SIGNED_ZERO => | ||||||||||||||||||||
| 41 | Data::Float::have_signed_zero() ? 1 : 0, | ||||||||||||||||||||
| 42 | Q_SIGNIFICAND_BITS => Data::Float::significand_bits(), | ||||||||||||||||||||
| 43 | Q_NATINT_BITS => Data::Integer::natint_bits(), | ||||||||||||||||||||
| 44 | }; | ||||||||||||||||||||
| 45 | 1 | return $self->SUPER::compile_c($file, %args); | |||||||||||||||||||
| 46 | } | ||||||||||||||||||||
| 47 | 0 | ▶ | sub ACTION_testauthor { $_[0]->generic_test(type => "author") } | ||||||||||||||||||
|
Subroutine
ACTION_testauthor: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | 1 | 1; | |||||||||||||||||||