line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
4
|
|
|
4
|
|
27863
|
use v5.14.0; |
|
4
|
|
|
|
|
18
|
|
|
4
|
|
|
|
|
150
|
|
2
|
4
|
|
|
4
|
|
16
|
use warnings; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
184
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package OS::Package::Role::Clean; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: Provides the clean method. |
7
|
|
|
|
|
|
|
our $VERSION = '0.2.7'; # VERSION |
8
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
17
|
use Path::Tiny; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
175
|
|
10
|
4
|
|
|
4
|
|
1155
|
use OS::Package::Log; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
494
|
|
11
|
4
|
|
|
4
|
|
31
|
use Role::Tiny; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
34
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub clean { |
14
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
15
|
|
|
|
|
|
|
|
16
|
0
|
0
|
0
|
|
|
|
if ( defined $self->workdir && -d $self->workdir ) { |
17
|
0
|
|
|
|
|
|
$LOGGER->info( sprintf 'cleaning work directory: %s', |
18
|
|
|
|
|
|
|
$self->workdir ); |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
path($self->workdir)->remove_tree; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
0
|
0
|
0
|
|
|
|
if ( defined $self->fakeroot && -d $self->fakeroot ) { |
24
|
0
|
|
|
|
|
|
$LOGGER->info( sprintf 'cleaning fakeroot directory: %s', |
25
|
|
|
|
|
|
|
$self->fakeroot ); |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
path($self->fakeroot)->remove_tree; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
return 1; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |