Linker/ELF/Any.pm

filter: Statementstmt 96.1% 25 / 26 Branchbran 66.6% 8 / 12 Conditioncond 71.4% 5 / 7 MC/DCmcdc 50.0% 2 / 4 Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 81.8% 45 / 55 CC 10 SCAR 15.7
CC
10
Cov
84%
_init
6.5
linker_flags
5.1
BEGIN
1.0
CRAP 4.8
« Linker/PE/MSVC.pm ↑ Summary Compiler/Unixy.pm »
1 package ExtUtils::Builder::Linker::ELF::Any;
2 3 $ExtUtils::Builder::Linker::ELF::Any::VERSION = '0.038';
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 3 ▶use parent 'ExtUtils::Builder::Linker::Unixy';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 5 ▶sub _init {
Subroutine _init: called CC=6 SCAR=18.7
9 5 my ($self, %args) = @_;
10 5 ▶ $args{ld} //= ['cc'];
Condition50%1/2
$args{"ld"} //= ["cc"]
l!l
50
MC/DC0%0/1
$args{"ld"} //= ["cc"]
$args{"ld"}
Truth table50%1/2
A
A= $args{"ld"}
Aresult
11
00
11 5 ▶ $args{export} //= $args{type} eq 'executable' ? 'none' : 'all';
Branch: 1 branch
BranchTrueFalseTotal
$args{'type'} eq 'executable' ? : 2 3 5
Condition50%1/2
$args{"export"} //= $args{"type"} eq "executable" ? "none" : "all"
l!l
05
MC/DC0%0/1
$args{"export"} //= $args{"type"} eq "executable" ? "none" : "all"
$args{"export"}
Truth table50%1/2
A
A= $args{"export"}
Aresult
11
00
12 5 $self->SUPER::_init(%args);
13 5 ▶ $self->{ccdlflags} = defined $args{ccdlflags} ? $args{ccdlflags} : Carp::croak('');
Branch: 1 branch
BranchTrueFalseTotal
defined $args{'ccdlflags'} ? : 5 0 5
14 5 ▶ $self->{lddlflags} = defined $args{lddlflags} ? $args{lddlflags} : Carp::croak('');
Branch: 1 branch
BranchTrueFalseTotal
defined $args{'lddlflags'} ? : 5 0 5
15 5 return;
16 }
17  
18 5 ▶sub linker_flags {
Subroutine linker_flags: called CC=5 SCAR=16.4
Pod undocumented
19 5 my ($self, $from, $to, %args) = @_;
20 5 my @ret = $self->SUPER::linker_flags($from, $to, %args);
21  
22 5 my $type = $self->type;
23 5 ▶ if ($type eq 'shared-library' or $type eq 'loadable-object') {
Branch: 2 branches
BranchTrueFalseTotal
if ($type eq 'shared-library' or $type eq 'loadable-object') { } 3 2 5
elsif ($type eq 'executable') { } 2 0 2
Condition100%3/3
$type eq "shared-library" or $type eq "loadable-object"
l!l&&r!l&&!r
122
MC/DC100%2/2
$type eq "shared-library" or $type eq "loadable-object"
$type eq "shared-library" $type eq "loadable-object"
Truth table100%3/3
A or B
A= $type eq "shared-library"B= $type eq "loadable-object"
ABresult
1X1
011
000
24 3 push @ret, $self->new_argument(ranking => 10, value => $self->{lddlflags});
25 }
26 elsif ($type eq 'executable') {
27 2 ▶ push @ret, $self->new_argument(ranking => 10, value => $self->{ccdlflags}) if $self->export eq 'all';
Branch: 1 branch
BranchTrueFalseTotal
if $self->export eq "all" 0 2 2
28 }
29 else {
30 0 croak("Unknown linkage type $type");
31 }
32 5 return @ret;
33 }
34  
35 3 1;
« Linker/PE/MSVC.pm ↑ Summary Compiler/Unixy.pm »