Minilla/CLI/Build.pm

filter: Statementstmt 70.0% 28 / 40 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 90.0% 9 / 10 Podpod 0.0% 0 / 1 totaltotal 69.8% 37 / 53 CC 2 SCAR 6.5
CC
2
Cov
67%
run
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.9
« Minilla/Release/RewriteChanges.pm ↑ Summary Minilla/License/Unknown.pm »
1 package Minilla::CLI::Build;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use File::Path qw(rmtree mkpath);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use File::Spec;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 ▶use Minilla::Project;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Minilla::WorkDir;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use Minilla::Logger;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 ▶use Minilla::Util qw(parse_options);
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 0 ▶sub run {
Subroutine run: not called CC=2 SCAR=17.9
Pod undocumented
15 0 my ($class, @args) = @_;
16  
17 0 my $test = 1;
18 0 parse_options(
19 \@args,
20 'test!' => \$test,
21 );
22  
23 0 my $project = Minilla::Project->new();
24 0 $project->regenerate_files();
25 0 ▶ errorf("Project validation failed.\n") unless $project->validate();
Branch: 1 branch
BranchTrueFalseTotal
unless $project->validate 0 0 0
26  
27 0 my $dst = File::Spec->rel2abs(sprintf("%s-%s", $project->dist_name, $project->version));
28  
29 # generate project directory
30 0 infof("Create %s\n", $dst);
31 0 rmtree($dst);
32 0 mkpath($dst);
33 0 my $work_dir = Minilla::WorkDir->new(
34 project => $project,
35 dir => $dst,
36 cleanup => 0,
37 file_modes => $project->file_modes,
38 );
39 0 $work_dir->build();
40 }
41  
42 1 1;
43 __END__
« Minilla/Release/RewriteChanges.pm ↑ Summary Minilla/License/Unknown.pm »