More generally I think subs in @INC allow for remote or database calls to load your code.# Hack for sketching use lib '/home/bsb/sb/lib'; BEGIN { # look in cwd first unshift @INC => sub { $_[1] =~ m!^SD/(?:.*/)?(.*)! || return; #print STDERR "Loading $_[1] $1\n"; open my($f), $1; #$INC{$_[1]} = "./$1"; $f; }; }
Brad
In reply to Re: How to use @INC coderef hooks
by bsb
in thread How to use @INC coderef hooks
by davido
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |