line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Minilla::CLI::Clean; |
2
|
1
|
|
|
1
|
|
915
|
use strict; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
27
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
21
|
|
4
|
1
|
|
|
1
|
|
4
|
use utf8; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
4
|
|
5
|
1
|
|
|
1
|
|
27
|
use ExtUtils::MakeMaker qw(prompt); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
46
|
|
6
|
1
|
|
|
1
|
|
6
|
use File::Path qw(rmtree); |
|
1
|
|
|
|
|
19
|
|
|
1
|
|
|
|
|
45
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
6
|
use Minilla::Project; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
9
|
1
|
|
|
1
|
|
6
|
use Minilla::Util qw(parse_options); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
256
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub run { |
12
|
0
|
|
|
0
|
0
|
|
my ($self, @args) = @_; |
13
|
|
|
|
|
|
|
|
14
|
0
|
|
|
|
|
|
my $yes_opt = 0; |
15
|
0
|
|
|
|
|
|
parse_options( |
16
|
|
|
|
|
|
|
\@args, |
17
|
|
|
|
|
|
|
'y!' => \$yes_opt, |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
my $project = Minilla::Project->new(); |
21
|
0
|
|
|
|
|
|
my @targets = grep { -e $_ } ( |
|
0
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
glob(sprintf("%s-*", $project->dist_name)), |
23
|
|
|
|
|
|
|
'blib', |
24
|
|
|
|
|
|
|
'Build', |
25
|
|
|
|
|
|
|
'MYMETA.json', |
26
|
|
|
|
|
|
|
'MYMETA.yml', |
27
|
|
|
|
|
|
|
'_build_params', |
28
|
|
|
|
|
|
|
'_build', # M::B |
29
|
|
|
|
|
|
|
'Makefile', |
30
|
|
|
|
|
|
|
'pm_to_blib', |
31
|
|
|
|
|
|
|
); |
32
|
0
|
|
|
|
|
|
print("Would remove $_\n") for (@targets); |
33
|
0
|
0
|
0
|
|
|
|
if ($yes_opt || prompt('Remove it?', 'y') =~ /y/i) { |
34
|
0
|
|
|
|
|
|
rmtree($_) for @targets; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
__END__ |