[Chicago-talk] Dynamic @INC builder?

Jim Thomason jthomasoniii at yahoo.com
Fri Jan 23 11:57:10 CST 2004


> You probably don't need a dynamic @INC as long as
> you have a coderef
> entry in your @INC.  See "perldoc -f require", and
> pay attention to
> the part towards the end where it talks about
> coderefs.

Admittedly, I've only now glanced at that for about 5
minutes, but my first impression is that that feature
is more masturbatory than useful.

I don't think it does quite what I'd like for two
reasons. Firstly, it appears to be a 5.8.0 feature
(doesn't show up in my 5.6 pod, you see), so for my
uses it's right out. Secondly, it does help find
files, but how does it know which directories to
search or what search technique to use?

So it looks like you either (a) specify the search
function in all affected scripts (which effectively
doesn't gain you anything, since you'd still need to
make your changes everywhere, unless you have some
sort of uber function) or (b) specify the search
function in some central module, in which case all the
coderef does is add a step (use @INC \&code; use
CentralSearch; vs. use Lib::Finder qw(keyword);).

Perhaps it's just my newness with this feature, but it
doesn't look like it handles quite what I'm proposing.


-Jim......

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/



More information about the Chicago-talk mailing list