$VERSION
=
'0.75'
;
BEGIN {
my
$w
=
$SIG
{__WARN__};
$SIG
{__WARN__} =
sub
{
$w
};
}
sub
new {
my
(
$class
,
%args
) =
@_
;
foreach
my
$method
(
qw(call load)
) {
*{
"$class\::$method"
} =
sub
{
shift
()->_top->
$method
(
@_
);
}
unless
defined
&{
"$class\::$method"
};
}
bless
( \
%args
,
$class
);
}
sub
AUTOLOAD {
my
$self
=
shift
;
local
$@;
my
$autoload
=
eval
{
$self
->_top->autoload } or
return
;
goto
&$autoload
;
}
sub
_top {
$_
[0]->{_top} }
sub
admin {
$_
[0]->_top->{admin} or Module::Install::Base::FakeAdmin->new;
}
sub
is_admin {
$_
[0]->admin->VERSION;
}
sub
DESTROY {}
my
$Fake
;
sub
new {
$Fake
||=
bless
(\
@_
,
$_
[0]) }
sub
AUTOLOAD {}
sub
DESTROY {}
BEGIN {
$SIG
{__WARN__} =
$SIG
{__WARN__}->();
}
1;