Also, if you really want to use a hook in @INC, this is how they work...
unshift @INC, sub { my $module = $_[1]; if ($module eq 'Foo.pm') { $INC{$module}++; my $line = 0; return sub { unless ($line++) { $_ = "1;\n"; return 1; } return 0; } } return; }; require Foo; # no-op
In reply to Re: Cancel/no-op a require
by tobyink
in thread Cancel/no-op a require
by sedusedan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |