line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Alien::Build::Plugin::Core::CleanInstall; |
2
|
|
|
|
|
|
|
|
3
|
47
|
|
|
47
|
|
200096
|
use strict; |
|
47
|
|
|
|
|
144
|
|
|
47
|
|
|
|
|
1344
|
|
4
|
47
|
|
|
47
|
|
229
|
use warnings; |
|
47
|
|
|
|
|
93
|
|
|
47
|
|
|
|
|
1014
|
|
5
|
47
|
|
|
47
|
|
725
|
use 5.008004; |
|
47
|
|
|
|
|
153
|
|
6
|
47
|
|
|
47
|
|
652
|
use Alien::Build::Plugin; |
|
47
|
|
|
|
|
141
|
|
|
47
|
|
|
|
|
389
|
|
7
|
47
|
|
|
47
|
|
1027
|
use Path::Tiny (); |
|
47
|
|
|
|
|
10385
|
|
|
47
|
|
|
|
|
9823
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: Implementation for clean_install hook. |
10
|
|
|
|
|
|
|
our $VERSION = '2.45'; # VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub init |
14
|
|
|
|
|
|
|
{ |
15
|
337
|
|
|
337
|
1
|
924
|
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
|
|
|
|
|
7
|
); |
23
|
2
|
100
|
|
|
|
75
|
if(-d $root) |
24
|
|
|
|
|
|
|
{ |
25
|
1
|
|
|
|
|
28
|
foreach my $child ($root->children) |
26
|
|
|
|
|
|
|
{ |
27
|
5
|
100
|
|
|
|
1339
|
if($child->basename eq '_alien') |
28
|
|
|
|
|
|
|
{ |
29
|
1
|
|
|
|
|
28
|
$build->log("keeping $child"); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
else |
32
|
|
|
|
|
|
|
{ |
33
|
4
|
|
|
|
|
127
|
$build->log("removing $child"); |
34
|
4
|
|
|
|
|
29
|
$child->remove_tree({ safe => 0}); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
} |
39
|
337
|
|
|
|
|
2426
|
); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |