line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Installer; |
2
|
|
|
|
|
|
|
BEGIN { |
3
|
1
|
|
|
1
|
|
1675
|
$Installer::AUTHORITY = 'cpan:GETTY'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
# ABSTRACT: What does it do? It installs stuff.... |
6
|
|
|
|
|
|
|
$Installer::VERSION = '0.903'; |
7
|
1
|
|
|
1
|
|
10
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
8
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
9
|
1
|
|
|
1
|
|
663
|
use Installer::Target; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
121
|
|
10
|
1
|
|
|
1
|
|
13
|
use Cwd; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
195
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our @functions = qw( |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
run |
15
|
|
|
|
|
|
|
export |
16
|
|
|
|
|
|
|
unset |
17
|
|
|
|
|
|
|
url |
18
|
|
|
|
|
|
|
file |
19
|
|
|
|
|
|
|
perl |
20
|
|
|
|
|
|
|
cpanm |
21
|
|
|
|
|
|
|
pip |
22
|
|
|
|
|
|
|
perldeps |
23
|
|
|
|
|
|
|
dzildeps |
24
|
|
|
|
|
|
|
postgres |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub import { |
29
|
1
|
|
|
1
|
|
24
|
my $pkg = caller; |
30
|
|
|
|
|
|
|
{ |
31
|
1
|
|
|
1
|
|
13
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
192
|
|
|
1
|
|
|
|
|
1
|
|
32
|
1
|
|
|
|
|
18
|
*{"$pkg\::install_to"} = sub { |
33
|
0
|
|
|
0
|
|
0
|
my ( $target_directory, $installer_code, $source_directory ) = @_; |
34
|
0
|
0
|
|
|
|
0
|
my $installer_target = Installer::Target->new( |
35
|
|
|
|
|
|
|
target_directory => $target_directory, |
36
|
|
|
|
|
|
|
installer_code => $installer_code, |
37
|
|
|
|
|
|
|
source_directory => defined $source_directory |
38
|
|
|
|
|
|
|
? $source_directory |
39
|
|
|
|
|
|
|
: getcwd(), |
40
|
|
|
|
|
|
|
); |
41
|
0
|
|
|
|
|
0
|
$installer_target->installation; |
42
|
1
|
|
|
|
|
8
|
}; |
43
|
|
|
|
|
|
|
} |
44
|
1
|
|
|
|
|
4
|
for my $command (@functions) { |
45
|
11
|
|
|
|
|
20
|
my $function = 'install_'.$command; |
46
|
1
|
|
|
1
|
|
6
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
144
|
|
47
|
11
|
|
|
|
|
262
|
*{"$pkg\::$command"} = sub { |
48
|
0
|
0
|
|
0
|
|
|
die "Not inside installation" unless defined $Installer::Target::current; |
49
|
0
|
|
|
|
|
|
$Installer::Target::current->$function(@_); |
50
|
11
|
|
|
|
|
45
|
}; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
__END__ |