Sponsoring The Perl Toolchain Summit 2025: Help make this important event another success Learn more
|
BEGIN {
$VERSION = '0.92' ;
}
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->VERSION;
}
sub DESTROY {}
my $fake ;
sub new {
$fake ||= bless (\ @_ , $_ [0]);
}
sub AUTOLOAD {}
sub DESTROY {}
BEGIN {
$SIG {__WARN__} = $SIG {__WARN__}->();
}
1;
|