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