| 1 | package Module::Build::Config; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 297 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 297 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 297 | our $VERSION = '0.4234'; | |||||||||||||||||||||||||||
| 6 | 297 | $VERSION = eval $VERSION; | |||||||||||||||||||||||||||
| 7 | 297 | ▶ | use Config; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 1032 | ▶ | sub new { | ||||||||||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.2
Pod
undocumented
| |||||||||||||||||||||||||||||
| 10 | 1032 | my ($pack, %args) = @_; | |||||||||||||||||||||||||||
| 11 | return bless { | ||||||||||||||||||||||||||||
| 12 | stack => {}, | ||||||||||||||||||||||||||||
| 13 | values => $args{values} || {}, | ||||||||||||||||||||||||||||
| 14 | 1032 | ▶ | }, $pack; | ||||||||||||||||||||||||||
|
Condition50%1/2
$args{'values'} || {}
MC/DC0%0/1
$args{'values'} || {}
$args{'values'}
Truth table50%1/2
A
A= $args{'values'}
| |||||||||||||||||||||||||||||
| 15 | } | ||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | 21392 | ▶ | sub get { | ||||||||||||||||||||||||||
|
Subroutine
get: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 18 | 21392 | my ($self, $key) = @_; | |||||||||||||||||||||||||||
| 19 | 21392 | ▶ | return $self->{values}{$key} if ref($self) && exists $self->{values}{$key}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
ref $self and exists $self->{"values"}{$key}
MC/DC100%2/2
ref $self and exists $self->{"values"}{$key}
ref $self
exists $self->{"values"}{$key}
Truth table100%3/3
A and B
A= ref $selfB= exists $self->{"values"}{$key}
| |||||||||||||||||||||||||||||
| 20 | 17959 | return $Config{$key}; | |||||||||||||||||||||||||||
| 21 | } | ||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | 3 | ▶ | sub set { | ||||||||||||||||||||||||||
|
Subroutine
set: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 24 | 3 | my ($self, $key, $val) = @_; | |||||||||||||||||||||||||||
| 25 | 3 | $self->{values}{$key} = $val; | |||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | 3 | ▶ | sub push { | ||||||||||||||||||||||||||
|
Subroutine
push: called CC=2 SCAR=7.6
Pod
undocumented
| |||||||||||||||||||||||||||||
| 29 | 3 | my ($self, $key, $val) = @_; | |||||||||||||||||||||||||||
| 30 | 0 | push @{$self->{stack}{$key}}, $self->{values}{$key} | |||||||||||||||||||||||||||
| 31 | 3 | ▶ | if exists $self->{values}{$key}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 32 | 3 | $self->{values}{$key} = $val; | |||||||||||||||||||||||||||
| 33 | } | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | 3 | ▶ | sub pop { | ||||||||||||||||||||||||||
|
Subroutine
pop: called CC=3 SCAR=15.7
Pod
undocumented
| |||||||||||||||||||||||||||||
| 36 | 3 | my ($self, $key) = @_; | |||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | 3 | my $val = delete $self->{values}{$key}; | |||||||||||||||||||||||||||
| 39 | 3 | ▶ | if ( exists $self->{stack}{$key} ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 40 | 0 | $self->{values}{$key} = pop @{$self->{stack}{$key}}; | |||||||||||||||||||||||||||
| 41 | 0 | ▶ | delete $self->{stack}{$key} unless @{$self->{stack}{$key}}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 42 | } | ||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | 3 | return $val; | |||||||||||||||||||||||||||
| 45 | } | ||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||
| 47 | 6 | ▶ | sub values_set { | ||||||||||||||||||||||||||
|
Subroutine
values_set: called CC=2 SCAR=7.1
Pod
undocumented
| |||||||||||||||||||||||||||||
| 48 | 6 | my $self = shift; | |||||||||||||||||||||||||||
| 49 | 6 | ▶ | return undef unless ref($self); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 50 | 6 | return $self->{values}; | |||||||||||||||||||||||||||
| 51 | } | ||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||
| 53 | 30 | ▶ | sub all_config { | ||||||||||||||||||||||||||
|
Subroutine
all_config: called CC=2 SCAR=7.1
Pod
undocumented
| |||||||||||||||||||||||||||||
| 54 | 30 | my $self = shift; | |||||||||||||||||||||||||||
| 55 | 30 | ▶ | my $v = ref($self) ? $self->{values} : {}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 56 | 30 | return {%Config, %$v}; | |||||||||||||||||||||||||||
| 57 | } | ||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | 297 | 1; | |||||||||||||||||||||||||||