It's evil and bad and I'm sure there are many reasons why you don't want to do this, but you can use a CODEREF in @INC to do something like:
BEGIN { @main::OINC = @INC; unshift @INC, sub { if ( $_[1] eq 'CGI.pm') { @INC = ($_[0]); } else { @INC = ($_[0], @main::OINC); } + return undef; + }; } + use strict; use CGI;
/J\
In reply to Re: Simulating the absence of a module
by gellyfish
in thread Simulating the absence of a module
by Thilosophy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |