Minilla/CLI/Clean.pm

filter: Statementstmt 73.5% 25 / 34 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 88.8% 8 / 9 Podpod 0.0% 0 / 1 totaltotal 64.7% 33 / 51 CC 5 SCAR 25.0
CC
5
Cov
64%
run
30.0
BEGIN
1.0
BEGIN
1.0
CRAP 12.2
« Minilla/CLI.pm ↑ Summary Minilla/Release/RunHooks.pm »
1 package Minilla::CLI::Clean;
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 1 ▶use ExtUtils::MakeMaker qw(prompt);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use File::Path qw(rmtree);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use Minilla::Logger;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Minilla::Project;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Minilla::Util qw(parse_options);
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 0 ▶sub run {
Subroutine run: not called CC=5 SCAR=34.0
Pod undocumented
13 0 my ($self, @args) = @_;
14  
15 0 my $yes_opt = 0;
16 0 parse_options(
17 \@args,
18 'y!' => \$yes_opt,
19 );
20  
21 0 my $project = Minilla::Project->new();
22 0 my @targets = grep { -e $_ } (
23 glob(sprintf("%s-*", $project->dist_name)),
24 'blib',
25 'Build',
26 'MYMETA.json',
27 'MYMETA.yml',
28 '_build_params',
29 '_build', # M::B
30 'Makefile',
31 'pm_to_blib',
32 );
33 0 infof("Would remove %s\n", $_) for @targets;
34 0 ▶ if ($yes_opt || prompt('Remove it?', 'y') =~ /y/i) {
Branch: 1 branch
BranchTrueFalseTotal
if ($yes_opt or &prompt("Remove it?", "y") =~ /y/i) 0 0 0
Condition0%0/3
$yes_opt or &prompt("Remove it?", "y") =~ /y/i
l!l&&r!l&&!r
000
MC/DC0%0/2
$yes_opt or &prompt("Remove it?", "y") =~ /y/i
$yes_opt &prompt("Remove it?", "y") =~ /y/i
Truth table0%0/3
A or B
A= $yes_optB= &prompt("Remove it?", "y") =~ /y/i
ABresult
1X1
011
000
35 0 rmtree($_) for @targets;
36 }
37 }
38  
39 1 1;
40 __END__
« Minilla/CLI.pm ↑ Summary Minilla/Release/RunHooks.pm »