2 package Module
::Install
::Base
;
6 # Suspend handler for "redefined" warnings
8 my $w = $SIG{__WARN__
};
9 $SIG{__WARN__
} = sub { $w };
12 ### This is the ONLY module that shouldn't have strict on
18 my ($class, %args) = @_;
20 foreach my $method ( qw(call load) ) {
21 *{"$class\::$method"} = sub {
22 shift()->_top->$method(@_);
23 } unless defined &{"$class\::$method"};
26 bless( \
%args, $class );
34 my $autoload = eval { $self->_top->autoload } or return;
40 sub _top
{ $_[0]->{_top
} }
45 $_[0]->_top->{admin
} or Module
::Install
::Base
::FakeAdmin
->new;
49 $_[0]->admin->VERSION;
54 package Module
::Install
::Base
::FakeAdmin
;
57 sub new
{ $Fake ||= bless(\
@_, $_[0]) }
63 # Restore warning handler
65 $SIG{__WARN__
} = $SIG{__WARN__
}->();