ShipIt/ProjectType/Perl/ModuleBuild.pm

filter: Statementstmt 28.0% 7 / 25 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 33.3% 2 / 6 Podpod 25.0% 1 / 4 totaltotal 23.2% 10 / 43 CC 5 SCAR 22.8
CC
5
Cov
21%
makedist
20.0
prepare_build
6.0
new
2.0
CRAP 9.8
« ShipIt/Step/ChangeRPMVersion.pm ↑ Summary ShipIt/Step/MakeDist.pm »
1 package ShipIt::ProjectType::Perl::ModuleBuild;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use base 'ShipIt::ProjectType::Perl::MakeMaker';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
6 0 my ($class) = @_;
7 0 my $self = $class->SUPER::new;
8 0 return $self;
9 }
10  
11 0 ▶sub prepare_build {
Subroutine prepare_build: not called CC=2 SCAR=17.9
Pod undocumented
12 0 my $self = shift;
13 0 ▶ system("perl", "Build.PL") and die "Build.PL failed";
Branch: 1 branch
BranchTrueFalseTotal
system "perl", "Build.PL" and die "Build.PL failed" 0 0 0
14 }
15  
16 0 ▶sub run_build {
Subroutine run_build: not called CC=1 SCAR=6.9
Pod undocumented
17 0 my $self = shift;
18 0 my($cmd) = @_;
19  
20 0 !system("perl", "Build", $cmd);
21 }
22  
23 0 ▶sub makedist {
Subroutine makedist: not called CC=4 SCAR=30.0
Pod documented
24 0 my $self = shift;
25 0 $self->prepare_build;
26  
27 0 require Module::Build;
28 0 my $build = Module::Build->current;
29  
30 0 my $file = $build->dist_dir;
31 0 $file .= ".tar.gz";
32 0 ▶ die "Distfile $file already exists.\n" if -e $file;
Branch: 1 branch
BranchTrueFalseTotal
if -e $file 0 0 0
33  
34 0 ▶ $self->run_build("dist") or die "make dist failed";
Branch: 1 branch
BranchTrueFalseTotal
$self->run_build("dist") or die "make dist failed" 0 0 0
35 0 ▶ die "Distfile $file doesn't exists, but should.\n" unless -e $file;
Branch: 1 branch
BranchTrueFalseTotal
unless -e $file 0 0 0
36 0 return $file;
37 }
38  
39 2 1;
40  
« ShipIt/Step/ChangeRPMVersion.pm ↑ Summary ShipIt/Step/MakeDist.pm »