line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Alien::Build::Plugin::Core::CleanInstall; |
2
|
|
|
|
|
|
|
|
3
|
47
|
|
|
47
|
|
249027
|
use strict; |
|
47
|
|
|
|
|
149
|
|
|
47
|
|
|
|
|
1451
|
|
4
|
47
|
|
|
47
|
|
251
|
use warnings; |
|
47
|
|
|
|
|
101
|
|
|
47
|
|
|
|
|
1133
|
|
5
|
47
|
|
|
47
|
|
784
|
use 5.008004; |
|
47
|
|
|
|
|
178
|
|
6
|
47
|
|
|
47
|
|
690
|
use Alien::Build::Plugin; |
|
47
|
|
|
|
|
127
|
|
|
47
|
|
|
|
|
436
|
|
7
|
47
|
|
|
47
|
|
1322
|
use Path::Tiny (); |
|
47
|
|
|
|
|
12241
|
|
|
47
|
|
|
|
|
10390
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: Implementation for clean_install hook. |
10
|
|
|
|
|
|
|
our $VERSION = '2.46'; # VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub init |
14
|
|
|
|
|
|
|
{ |
15
|
337
|
|
|
337
|
1
|
853
|
my($self, $meta) = @_; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
$meta->default_hook( |
18
|
|
|
|
|
|
|
clean_install => sub { |
19
|
2
|
|
|
2
|
|
6
|
my($build) = @_; |
20
|
|
|
|
|
|
|
my $root = Path::Tiny->new( |
21
|
|
|
|
|
|
|
$build->runtime_prop->{prefix} |
22
|
2
|
|
|
|
|
10
|
); |
23
|
2
|
100
|
|
|
|
74
|
if(-d $root) |
24
|
|
|
|
|
|
|
{ |
25
|
1
|
|
|
|
|
38
|
foreach my $child ($root->children) |
26
|
|
|
|
|
|
|
{ |
27
|
5
|
100
|
|
|
|
1599
|
if($child->basename eq '_alien') |
28
|
|
|
|
|
|
|
{ |
29
|
1
|
|
|
|
|
33
|
$build->log("keeping $child"); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
else |
32
|
|
|
|
|
|
|
{ |
33
|
4
|
|
|
|
|
142
|
$build->log("removing $child"); |
34
|
4
|
|
|
|
|
32
|
$child->remove_tree({ safe => 0}); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
} |
39
|
337
|
|
|
|
|
2352
|
); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |