line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#line 1 |
2
|
|
|
|
|
|
|
package Module::Install::Base; |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
$VERSION = '0.77'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# Suspend handler for "redefined" warnings |
7
|
3
|
|
|
3
|
|
7
|
BEGIN { |
8
|
3
|
|
|
|
|
904
|
my $w = $SIG{__WARN__}; |
|
3
|
|
|
|
|
55
|
|
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
|
0
|
|
|
0
|
0
|
|
|
44
|
|
|
|
|
|
|
sub admin { |
45
|
0
|
|
|
|
|
|
$_[0]->_top->{admin} or Module::Install::Base::FakeAdmin->new; |
46
|
0
|
|
|
|
|
|
} |
47
|
0
|
|
|
0
|
|
|
|
48
|
0
|
0
|
|
|
|
|
#line 101 |
|
0
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub is_admin { |
51
|
0
|
|
|
|
|
|
$_[0]->admin->VERSION; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub DESTROY {} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
package Module::Install::Base::FakeAdmin; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
my $Fake; |
59
|
|
|
|
|
|
|
sub new { $Fake ||= bless(\@_, $_[0]) } |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub AUTOLOAD {} |
62
|
|
|
|
|
|
|
|
63
|
0
|
|
|
0
|
|
|
sub DESTROY {} |
64
|
0
|
|
|
|
|
|
|
65
|
0
|
0
|
|
|
|
|
# Restore warning handler |
|
0
|
|
|
|
|
|
|
66
|
0
|
|
|
|
|
|
BEGIN { |
67
|
|
|
|
|
|
|
$SIG{__WARN__} = $SIG{__WARN__}->(); |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
1; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
#line 146 |