| 1 | package Dist::Zilla::Role::BuildPL 6.040; | ||||||||||||||||||||||||||||
| 2 | # ABSTRACT: Common ground for Build.PL based builders | ||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||
| 4 | 3 | ▶ | use Moose::Role; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 3 | with 'Dist::Zilla::Role::InstallTool', | |||||||||||||||||||||||||||
| 6 | 'Dist::Zilla::Role::BuildRunner', | ||||||||||||||||||||||||||||
| 7 | 'Dist::Zilla::Role::TestRunner'; | ||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 3 | ▶ | use Dist::Zilla::Pragmas; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | 3 | ▶ | use namespace::autoclean; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | #pod =head1 DESCRIPTION | ||||||||||||||||||||||||||||
| 14 | #pod | ||||||||||||||||||||||||||||
| 15 | #pod This role is a helper for Build.PL based installers. It implements the | ||||||||||||||||||||||||||||
| 16 | #pod L<Dist::Zilla::Plugin::BuildRunner> and L<Dist::Zilla::Plugin::TestRunner> | ||||||||||||||||||||||||||||
| 17 | #pod roles, and requires you to implement the L<Dist::Zilla::Plugin::PrereqSource> | ||||||||||||||||||||||||||||
| 18 | #pod and L<Dist::Zilla::Plugin::InstallTool> roles yourself. | ||||||||||||||||||||||||||||
| 19 | #pod | ||||||||||||||||||||||||||||
| 20 | #pod =cut | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 0 | ▶ | sub build { | ||||||||||||||||||||||||||
|
Subroutine
build: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 23 | 0 | my $self = shift; | |||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | return | ||||||||||||||||||||||||||||
| 26 | 0 | ▶ | if -e 'Build' and (stat 'Build.PL')[9] <= (stat 'Build')[9]; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
-e "Build" and (stat "Build.PL")[9] <= (stat "Build")[9]
MC/DC0%0/2
-e "Build" and (stat "Build.PL")[9] <= (stat "Build")[9]
-e "Build"
(stat "Build.PL")[9] <= (stat "Build")[9]
Truth table0%0/3
A and B
A= -e "Build"B= (stat "Build.PL")[9] <= (stat "Build")[9]
| |||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | 0 | $self->log_debug("running $^X Build.PL"); | |||||||||||||||||||||||||||
| 29 | 0 | ▶ | system $^X, 'Build.PL' and die "error with Build.PL\n"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | 0 | $self->log_debug("running $^X Build"); | |||||||||||||||||||||||||||
| 32 | 0 | ▶ | system $^X, 'Build' and die "error running $^X Build\n"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | 0 | return; | |||||||||||||||||||||||||||
| 35 | } | ||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | 0 | ▶ | sub test { | ||||||||||||||||||||||||||
|
Subroutine
test: not called CC=7 SCAR=40.3
Pod
undocumented
| |||||||||||||||||||||||||||||
| 38 | 0 | my ($self, $target, $arg) = @_; | |||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||
| 40 | 0 | $self->build; | |||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | my $job_count = $arg && exists $arg->{jobs} | ||||||||||||||||||||||||||||
| 43 | ? $arg->{jobs} | ||||||||||||||||||||||||||||
| 44 | 0 | ▶ | : $self->default_jobs; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$arg and exists $arg->{"jobs"}
MC/DC0%0/2
$arg and exists $arg->{"jobs"}
$arg
exists $arg->{"jobs"}
Truth table0%0/3
A and B
A= $argB= exists $arg->{"jobs"}
| |||||||||||||||||||||||||||||
| 45 | 0 | my $jobs = "j$job_count"; | |||||||||||||||||||||||||||
| 46 | 0 | my $ho = "HARNESS_OPTIONS"; | |||||||||||||||||||||||||||
| 47 | 0 | ▶ | local $ENV{$ho} = $ENV{$ho} ? "$ENV{$ho}:$jobs" : $jobs; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||
| 49 | 0 | ▶ | my @testing = $self->zilla->logger->get_debug || $arg->{test_verbose} ? '--verbose' : (); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/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 table0%0/3
A or B
A= $self->zilla->logger->get_debugB= $arg->{"test_verbose"}
| |||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||
| 51 | 0 | $self->log_debug('running ' . join(' ', $^X, 'Build', 'test', @testing)); | |||||||||||||||||||||||||||
| 52 | 0 | ▶ | system $^X, 'Build', 'test', @testing and die "error running $^X Build test\n"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||
| 54 | 0 | return; | |||||||||||||||||||||||||||
| 55 | } | ||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||
| 57 | 3 | 1; | |||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | __END__ | ||||||||||||||||||||||||||||