When inserting a code reference into @INC (as described a bit more than halfway down the require docs), what should you return from your code to indicate to require that the request has been fully handled and it should not continue checking @INC in search of the file?I think the docs are mistaken. It should either return a file handle, or a sub, not "not-a-filehandle" and a sub.
use 5.010; use lib sub {say "Using $_[1]"; sub {$_ = "1;"; 0}}, sub {die}; use Blah; say "Hi!"; __END__ Using Blah.pm Hi!
In reply to Re: Telling require "I've handled it"
by JavaFan
in thread Telling require "I've handled it"
by dsheroh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |