line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#line 1 |
2
|
|
|
|
|
|
|
package Module::Install::Base; |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
$VERSION = '0.64'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# Suspend handler for "redefined" warnings |
7
|
1
|
|
|
1
|
|
3
|
BEGIN { |
|
1
|
|
|
1
|
|
6
|
|
8
|
1
|
|
|
|
|
364
|
my $w = $SIG{__WARN__}; |
|
1
|
|
|
|
|
30
|
|
|
1
|
|
|
|
|
463
|
|
|
1
|
|
|
|
|
30
|
|
9
|
|
|
|
|
|
|
$SIG{__WARN__} = sub { $w }; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
### This is the ONLY module that shouldn't have strict on |
13
|
|
|
|
|
|
|
# use strict; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
#line 41 |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub new { |
18
|
|
|
|
|
|
|
my ($class, %args) = @_; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
foreach my $method ( qw(call load) ) { |
21
|
|
|
|
|
|
|
*{"$class\::$method"} = sub { |
22
|
|
|
|
|
|
|
shift()->_top->$method(@_); |
23
|
|
|
|
|
|
|
} unless defined &{"$class\::$method"}; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
bless( \%args, $class ); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
#line 61 |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub AUTOLOAD { |
32
|
|
|
|
|
|
|
my $self = shift; |
33
|
|
|
|
|
|
|
local $@; |
34
|
|
|
|
|
|
|
my $autoload = eval { $self->_top->autoload } or return; |
35
|
|
|
|
|
|
|
goto &$autoload; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
#line 76 |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub _top { $_[0]->{_top} } |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
#line 89 |
43
|
3
|
|
|
3
|
0
|
14
|
|
44
|
|
|
|
|
|
|
sub admin { |
45
|
3
|
|
|
|
|
8
|
$_[0]->_top->{admin} or Module::Install::Base::FakeAdmin->new; |
46
|
6
|
|
|
|
|
35
|
} |
47
|
0
|
|
|
0
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
48
|
6
|
50
|
|
|
|
9
|
sub is_admin { |
|
6
|
|
|
|
|
71
|
|
49
|
|
|
|
|
|
|
$_[0]->admin->VERSION; |
50
|
|
|
|
|
|
|
} |
51
|
3
|
|
|
|
|
20
|
|
52
|
|
|
|
|
|
|
sub DESTROY {} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
package Module::Install::Base::FakeAdmin; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
my $Fake; |
57
|
|
|
|
|
|
|
sub new { $Fake ||= bless(\@_, $_[0]) } |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub AUTOLOAD {} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub DESTROY {} |
62
|
|
|
|
|
|
|
|
63
|
4
|
|
|
4
|
|
14
|
# Restore warning handler |
64
|
4
|
|
|
|
|
26
|
BEGIN { |
65
|
4
|
50
|
|
|
|
15
|
$SIG{__WARN__} = $SIG{__WARN__}->(); |
|
4
|
|
|
|
|
70
|
|
66
|
4
|
|
|
|
|
395
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1; |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
#line 138 |