| 1 | package ExtUtils::Config::MakeMaker; | ||||||||||||||||||||
| 2 | 2 | $ExtUtils::Config::MakeMaker::VERSION = '0.010'; | |||||||||||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 2 | ▶ | use ExtUtils::MakeMaker::Config; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 1 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 9 | 1 | my ($class, $maker) = @_; | |||||||||||||||||||
| 10 | 1 | return bless { maker => $maker }, $class; | |||||||||||||||||||
| 11 | } | ||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | 1256 | ▶ | sub get { | ||||||||||||||||||
|
Subroutine
get: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 14 | 1256 | my ($self, $key) = @_; | |||||||||||||||||||
| 15 | 1256 | ▶ | return exists $self->{maker}{uc $key} ? $self->{maker}{uc $key} : $Config{$key}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 16 | } | ||||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | 0 | ▶ | sub exists { | ||||||||||||||||||
|
Subroutine
exists: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 19 | 0 | my ($self, $key) = @_; | |||||||||||||||||||
| 20 | 0 | return exists $Config{$key}; | |||||||||||||||||||
| 21 | } | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 1 | ▶ | sub all_config { | ||||||||||||||||||
|
Subroutine
all_config: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 24 | 1 | my $self = shift; | |||||||||||||||||||
| 25 | 1 | my %result; | |||||||||||||||||||
| 26 | 1 | for my $key (keys %Config) { | |||||||||||||||||||
| 27 | 1256 | $result{$key} = $self->get($key); | |||||||||||||||||||
| 28 | } | ||||||||||||||||||||
| 29 | 1 | return \%result; | |||||||||||||||||||
| 30 | } | ||||||||||||||||||||
| 31 | |||||||||||||||||||||
| 32 | 2 | ▶ | sub values_set { | ||||||||||||||||||
|
Subroutine
values_set: called CC=4 SCAR=13.9
Pod
documented
| |||||||||||||||||||||
| 33 | 2 | my $self = shift; | |||||||||||||||||||
| 34 | 2 | my %result; | |||||||||||||||||||
| 35 | 2 | for my $key (keys %Config) { | |||||||||||||||||||
| 36 | 2512 | ▶ | next if not exists $self->{maker}{uc $key}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 37 | 2 | ▶ | next if $self->{maker}{uc $key} eq $Config{$key}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 38 | 2 | $result{$key} = $self->{maker}{uc $key}; | |||||||||||||||||||
| 39 | } | ||||||||||||||||||||
| 40 | 2 | return \%result; | |||||||||||||||||||
| 41 | } | ||||||||||||||||||||
| 42 | |||||||||||||||||||||
| 43 | 0 | ▶ | sub serialize { | ||||||||||||||||||
|
Subroutine
serialize: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 44 | 0 | my $self = shift; | |||||||||||||||||||
| 45 | 0 | require Data::Dumper; | |||||||||||||||||||
| 46 | 0 | ▶ | return $self->{serialized} ||= Data::Dumper->new($self->values_set)->Terse(1)->Sortkeys(1)->Dump; | ||||||||||||||||||
|
Condition0%0/3
$self->{"serialized"} ||= "Data::Dumper"->new($self->values_set)->Terse(1)->Sortkeys(1)->Dump
MC/DC0%0/2
$self->{"serialized"} ||= "Data::Dumper"->new($self->values_set)->Terse(1)->Sortkeys(1)->Dump
$self->{"serialized"}
"Data::Dumper"->new($self->values_set)->Terse(1)->Sortkeys(1)->Dump
Truth table0%0/3
A ||= B
A= $self->{"serialized"}B= "Data::Dumper"->new($self->values_set)->Terse(1)->Sortkeys(1)->Dump
| |||||||||||||||||||||
| 47 | } | ||||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | 1 | ▶ | sub materialize { | ||||||||||||||||||
|
Subroutine
materialize: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 50 | 1 | my $self = shift; | |||||||||||||||||||
| 51 | 1 | require ExtUtils::Config; | |||||||||||||||||||
| 52 | 1 | return ExtUtils::Config->new($self->values_set); | |||||||||||||||||||
| 53 | } | ||||||||||||||||||||
| 54 | |||||||||||||||||||||
| 55 | 0 | ▶ | sub but { | ||||||||||||||||||
|
Subroutine
but: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 56 | 0 | my ($self, %args) = @_; | |||||||||||||||||||
| 57 | 0 | return $self->materialize->but(%args); | |||||||||||||||||||
| 58 | } | ||||||||||||||||||||
| 59 | |||||||||||||||||||||
| 60 | 2 | 1; | |||||||||||||||||||
| 61 | |||||||||||||||||||||
| 62 | #ABSTRACT: A ExtUtils::Config compatible wrapper for ExtUtils::MakeMaker's configuration. | ||||||||||||||||||||
| 63 | |||||||||||||||||||||
| 64 | __END__ | ||||||||||||||||||||