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