| 1 | package Dist::Zilla::Plugin::MakeMaker::Runner 6.040; | ||||||||||||||||||||||||||||||||
| 2 | # ABSTRACT: Test and build dists with a Makefile.PL | ||||||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||||||
| 4 | 13 | ▶ | use Moose; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 5 | 13 | with( | |||||||||||||||||||||||||||||||
| 6 | 'Dist::Zilla::Role::BuildRunner', | ||||||||||||||||||||||||||||||||
| 7 | 'Dist::Zilla::Role::TestRunner', | ||||||||||||||||||||||||||||||||
| 8 | ); | ||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||
| 10 | 13 | ▶ | use Dist::Zilla::Pragmas; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||
| 12 | 13 | ▶ | use namespace::autoclean; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||
| 14 | 13 | ▶ | use Config; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||
| 16 | has 'make_path' => ( | ||||||||||||||||||||||||||||||||
| 17 | isa => 'Str', | ||||||||||||||||||||||||||||||||
| 18 | is => 'ro', | ||||||||||||||||||||||||||||||||
| 19 | 13 | ▶ | default => $Config{make} || 'make', | ||||||||||||||||||||||||||||||
|
Condition50%1/2
$Dist::Zilla::Plugin::MakeMaker::Runner::Config{'make'} || 'make'
MC/DC0%0/1
$Dist::Zilla::Plugin::MakeMaker::Runner::Config{'make'} || 'make'
$Dist::Zilla::Plugin::MakeMaker::Runner::Config{'make'}
Truth table50%1/2
A
A= $Dist::Zilla::Plugin::MakeMaker::Runner::Config{'make'}
| |||||||||||||||||||||||||||||||||
| 20 | ); | ||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||
| 22 | 2 | ▶ | sub build { | ||||||||||||||||||||||||||||||
|
Subroutine
build: called CC=6 SCAR=19.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 23 | 2 | my $self = shift; | |||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||
| 25 | 2 | my $make = $self->make_path; | |||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||
| 27 | 2 | ▶ | my $makefile = $^O eq 'VMS' ? 'Descrip.MMS' : 'Makefile'; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||
| 29 | return | ||||||||||||||||||||||||||||||||
| 30 | 2 | ▶ | if -e $makefile and (stat 'Makefile.PL')[9] <= (stat $makefile)[9]; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
-e $makefile and (stat "Makefile.PL")[9] <= (stat $makefile)[9]
MC/DC0%0/2
-e $makefile and (stat "Makefile.PL")[9] <= (stat $makefile)[9]
-e $makefile
(stat "Makefile.PL")[9] <= (stat $makefile)[9]
Truth table33%1/3
A and B
A= -e $makefileB= (stat "Makefile.PL")[9] <= (stat $makefile)[9]
| |||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||
| 32 | 2 | $self->log_debug("running $^X Makefile.PL"); | |||||||||||||||||||||||||||||||
| 33 | 2 | ▶ | system($^X => qw(Makefile.PL INSTALLMAN1DIR=none INSTALLMAN3DIR=none)) and die "error with Makefile.PL\n"; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||
| 35 | 2 | $self->log_debug("running $make"); | |||||||||||||||||||||||||||||||
| 36 | 2 | ▶ | system($make) and die "error running $make\n"; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||||||
| 38 | 2 | return; | |||||||||||||||||||||||||||||||
| 39 | } | ||||||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||||||
| 41 | 2 | ▶ | sub test { | ||||||||||||||||||||||||||||||
|
Subroutine
test: called CC=8 SCAR=23.7
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 42 | 2 | my ($self, $target, $arg) = @_; | |||||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||||||
| 44 | 2 | my $make = $self->make_path; | |||||||||||||||||||||||||||||||
| 45 | 2 | $self->build; | |||||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||||||
| 47 | my $job_count = $arg && exists $arg->{jobs} | ||||||||||||||||||||||||||||||||
| 48 | ? $arg->{jobs} | ||||||||||||||||||||||||||||||||
| 49 | 2 | ▶ | : $self->default_jobs; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$arg and exists $arg->{"jobs"}
MC/DC0%0/2
$arg and exists $arg->{"jobs"}
$arg
exists $arg->{"jobs"}
Truth table33%1/3
A and B
A= $argB= exists $arg->{"jobs"}
| |||||||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||||||
| 51 | 2 | my $jobs = "j$job_count"; | |||||||||||||||||||||||||||||||
| 52 | 2 | my $ho = "HARNESS_OPTIONS"; | |||||||||||||||||||||||||||||||
| 53 | 2 | ▶ | local $ENV{$ho} = $ENV{$ho} ? "$ENV{$ho}:$jobs" : $jobs; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||||||
| 55 | 2 | ▶ | $self->log_debug(join(' ', "running $make test", ( $self->zilla->logger->get_debug ? 'TEST_VERBOSE=1' : () ))); | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 56 | system($make, 'test', | ||||||||||||||||||||||||||||||||
| 57 | 2 | ▶ | ( $self->zilla->logger->get_debug || $arg->{test_verbose} ? 'TEST_VERBOSE=1' : () ), | ||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition33%1/3
$self->zilla->logger->get_debug or $arg->{"test_verbose"}
MC/DC0%0/2
$self->zilla->logger->get_debug or $arg->{"test_verbose"}
$self->zilla->logger->get_debug
$arg->{"test_verbose"}
Truth table33%1/3
A or B
A= $self->zilla->logger->get_debugB= $arg->{"test_verbose"}
| |||||||||||||||||||||||||||||||||
| 58 | ) and die "error running $make test\n"; | ||||||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||||||
| 60 | 2 | return; | |||||||||||||||||||||||||||||||
| 61 | } | ||||||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||||||
| 63 | 13 | __PACKAGE__->meta->make_immutable; | |||||||||||||||||||||||||||||||
| 64 | 13 | 1; | |||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||
| 66 | __END__ | ||||||||||||||||||||||||||||||||