in reply to How to use @INC coderef hooks

I played with it briefly, producing the following. It just ignores all but the last element of the package name and looks in the cwd (for our local namespace SD::)
# 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; }; }
More generally I think subs in @INC allow for remote or database calls to load your code.

Brad