| 1 | package Module::Install::MakeMaker; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 46 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 46 | ▶ | use ExtUtils::MakeMaker (); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 46 | ▶ | use Module::Install::Base (); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 46 | ▶ | use vars qw{$VERSION @ISA $ISCORE}; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | 46 | ▶ | BEGIN { | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | 46 | $VERSION = '1.21'; | |||||||||||||||||||||||||||
| 10 | 46 | @ISA = 'Module::Install::Base'; | |||||||||||||||||||||||||||
| 11 | 46 | $ISCORE = 1; | |||||||||||||||||||||||||||
| 12 | } | ||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | 46 | my $makefile = undef; | |||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 1 | ▶ | sub WriteMakefile { | ||||||||||||||||||||||||||
|
Subroutine
WriteMakefile: called CC=9 SCAR=31.1
Pod
undocumented
| |||||||||||||||||||||||||||||
| 17 | 1 | my ($self, %args) = @_; | |||||||||||||||||||||||||||
| 18 | 1 | $makefile = $self->load('Makefile'); | |||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | # mapping between MakeMaker and META.yml keys | ||||||||||||||||||||||||||||
| 21 | 1 | $args{MODULE_NAME} = $args{NAME}; | |||||||||||||||||||||||||||
| 22 | 1 | ▶ | unless ( $args{NAME} = $args{DISTNAME} or ! $args{MODULE_NAME} ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$args{"NAME"} = $args{"DISTNAME"} or not $args{"MODULE_NAME"}
MC/DC0%0/2
$args{"NAME"} = $args{"DISTNAME"} or not $args{"MODULE_NAME"}
$args{"NAME"} = $args{"DISTNAME"}
not $args{"MODULE_NAME"}
Truth table33%1/3
A or not(B)
A= $args{"NAME"} = $args{"DISTNAME"}B= not $args{"MODULE_NAME"}
| |||||||||||||||||||||||||||||
| 23 | 0 | $args{NAME} = $args{MODULE_NAME}; | |||||||||||||||||||||||||||
| 24 | 0 | $args{NAME} =~ s/::/-/g; | |||||||||||||||||||||||||||
| 25 | } | ||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | 1 | foreach my $key ( qw{name module_name version version_from abstract author installdirs} ) { | |||||||||||||||||||||||||||
| 28 | 7 | ▶ | my $value = delete($args{uc($key)}) or next; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 29 | 0 | $self->$key($value); | |||||||||||||||||||||||||||
| 30 | } | ||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | 1 | ▶ | if (my $prereq = delete($args{PREREQ_PM})) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 33 | 0 | ▶ | while (my($k,$v) = each %$prereq) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 34 | 0 | $self->requires($k,$v); | |||||||||||||||||||||||||||
| 35 | } | ||||||||||||||||||||||||||||
| 36 | } | ||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | 1 | ▶ | if (my $prereq = delete($args{BUILD_REQUIRES})) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 39 | 0 | ▶ | while (my($k,$v) = each %$prereq) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 40 | 0 | $self->build_requires($k,$v); | |||||||||||||||||||||||||||
| 41 | } | ||||||||||||||||||||||||||||
| 42 | } | ||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | # put the remaining args to makemaker_args | ||||||||||||||||||||||||||||
| 45 | 1 | $self->makemaker_args(%args); | |||||||||||||||||||||||||||
| 46 | } | ||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||
| 48 | 46 | ▶ | END { | ||||||||||||||||||||||||||
|
Subroutine
END: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||
| 49 | 46 | ▶ | if ( $makefile ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 50 | 1 | $makefile->write; | |||||||||||||||||||||||||||
| 51 | 1 | $makefile->Meta->write; | |||||||||||||||||||||||||||
| 52 | } | ||||||||||||||||||||||||||||
| 53 | } | ||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||
| 55 | 46 | 1; | |||||||||||||||||||||||||||