Randy W. Sims wrote:
Is there a way to make C<require> or C<use> fail without manipulating @INC or hiding the physical file?
Check out Devel::Hide. I've never used it, but it's supposed to do that. From the SYNOPSIS: use Devel::Hide qw(Module/ToHide.pm); require Module::ToHide; # fails use Devel::Hide qw(Test::Pod Test::Pod::Coverage); require Test::More; # ok require Test::Pod 1.18; # fails Other common usage patterns: $ perl -MDevel::Hide=Module::ToHide Makefile.PL bash$ PERL5OPT=MDevel::Hide bash$ DEVEL_HIDE_PM='Module::Which Test::Pod' bash$ export PERL5OPT DEVEL_HIDE_PM bash$ perl Makefile.PL Note that it "manipulates @INC", but I don't see a problem with that. Cheers, Ivan