You can also push a code ref (that returns undef) onto the front of @INC:
BEGIN { unshift @INC, sub { my( $self, $file )= @_; print "Searching for $file...\n"; return; }; } require Net::Ping;
See require for more details and other options.
- tye
In reply to Re: Overriding the built-in require function (@INC)
by tye
in thread Overriding the built-in require function
by /dev/urandom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |