line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Alien::Build::Plugin::Probe::Override; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
280134
|
use strict; |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
60
|
|
4
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
46
|
|
5
|
2
|
|
|
2
|
|
36
|
use 5.008001; |
|
2
|
|
|
|
|
7
|
|
6
|
2
|
|
|
2
|
|
1007
|
use Alien::Build::Plugin; |
|
2
|
|
|
|
|
2127
|
|
|
2
|
|
|
|
|
15
|
|
7
|
2
|
|
|
2
|
|
1030
|
use Path::Tiny qw( path ); |
|
2
|
|
|
|
|
11259
|
|
|
2
|
|
|
|
|
654
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: Override on a per-alien basis |
10
|
|
|
|
|
|
|
our $VERSION = '0.03'; # VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub init |
14
|
|
|
|
|
|
|
{ |
15
|
7
|
|
|
7
|
1
|
63136
|
my($self, $meta) = @_; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
$meta->register_hook( |
18
|
|
|
|
|
|
|
override => sub { |
19
|
6
|
|
|
6
|
|
17388
|
my($build) = @_; |
20
|
|
|
|
|
|
|
|
21
|
6
|
50
|
|
|
|
55
|
if(Alien::Build::rc->can('override')) |
22
|
|
|
|
|
|
|
{ |
23
|
6
|
|
|
|
|
16
|
foreach my $try (qw( stage prefix )) |
24
|
|
|
|
|
|
|
{ |
25
|
8
|
|
|
|
|
25
|
my $class = path($build->install_prop->{$try})->basename; |
26
|
8
|
100
|
|
|
|
472
|
if($class =~ /^Alien-/) |
27
|
|
|
|
|
|
|
{ |
28
|
4
|
|
|
|
|
16
|
my $override = Alien::Build::rc::override($class); |
29
|
4
|
50
|
|
|
|
25
|
if($override) |
30
|
|
|
|
|
|
|
{ |
31
|
4
|
50
|
|
|
|
32
|
if($override =~ /^(system|share|default)$/) |
32
|
|
|
|
|
|
|
{ |
33
|
4
|
|
|
|
|
33
|
$build->log("override for $class => $override"); |
34
|
4
|
|
|
|
|
352
|
return $override; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
else |
37
|
|
|
|
|
|
|
{ |
38
|
0
|
|
|
|
|
0
|
$build->log("override for $class => $override is not valid"); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
2
|
50
|
|
|
|
15
|
$ENV{ALIEN_INSTALL_TYPE} || ''; |
46
|
|
|
|
|
|
|
}, |
47
|
7
|
|
|
|
|
78
|
); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
__END__ |