| 1 | package ExtUtils::Builder::Compiler::Unixy; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | 3 | $ExtUtils::Builder::Compiler::Unixy::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::Compiler'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 10 | ▶ | sub _init { | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_init: called CC=5 SCAR=16.6
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 10 | my ($self, %args) = @_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 10 | ▶ | $args{cc} //= ['cc']; | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$args{"cc"} //= ["cc"]
MC/DC0%0/1
$args{"cc"} //= ["cc"]
$args{"cc"}
Truth table50%1/2
A
A= $args{"cc"}
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 10 | $self->SUPER::_init(%args); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 10 | $self->{cccdlflags} = $args{cccdlflags}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 10 | ▶ | $self->{pic} = $args{pic} // ($self->type eq 'shared-library' || $self->type eq 'loadable-object') && @{ $self->{cccdlflags} }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition66%6/9
$args{"pic"} // ($self->type eq "shared-library" || $self->type eq "loadable-object") && @{$self->{"cccdlflags"};}
$self->type eq "shared-library" || $self->type eq "loadable-object" and @{$self->{"cccdlflags"};}
$self->type eq "shared-library" or $self->type eq "loadable-object"
MC/DC50%2/4
$args{"pic"} // ($self->type eq "shared-library" || $self->type eq "loadable-object") && @{$self->{"cccdlflags"};}
$args{"pic"}
$self->type eq "shared-library"
$self->type eq "loadable-object"
@{$self->{"cccdlflags"};}
Truth table50%3/6
A // B or C and D
A= $args{"pic"}B= $self->type eq "shared-library"C= $self->type eq "loadable-object"D= @{$self->{"cccdlflags"};}
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 10 | return; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | 10 | ▶ | sub compile_flags { | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
compile_flags: called CC=6 SCAR=17.9
Pod
undocumented
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | 10 | my ($self, $from, $to) = @_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 10 | my @ret; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 10 | push @ret, $self->new_argument(ranking => 75, value => [ '-o' => $to, '-c', $from ]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 10 | ▶ | push @ret, $self->new_argument(ranking => 45, value => $self->{cccdlflags}) if $self->{pic}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | 10 | ▶ | push @ret, $self->new_argument(ranking => 15, value => [ "-std=$self->{standard}"]) if $self->{standard}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | 10 | push @ret, map { $self->new_argument(ranking => $_->{ranking}, value => [ "-I$_->{value}" ]) } @{ $self->{include_dirs} }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 10 | for my $entry (@{ $self->{defines} }) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | 4 | my $key = $entry->{key}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | 4 | ▶ | my $value = defined $entry->{value} ? $entry->{value} ne '' ? "-D$key=$entry->{value}" : "-D$key" : "-U$key"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | 4 | push @ret, $self->new_argument(ranking => $entry->{ranking}, value => [$value]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | 10 | return @ret; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | 3 | 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | #ABSTRACT: Class for compiling with a unix compiler | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | __END__ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||