Is there a Module that acts something like blib does?by taint (Chaplain)
|on Jan 09, 2014 at 16:11 UTC||Need Help??|
taint has asked for the
wisdom of the Perl Monks concerning the following question:
I asked a similar question awhile back, and while I appreciated the replies. I never was able to find an ideal solution. Here's hoping...
Anyway, if you're working within web space, and you want to create/use small utility type Modules you've built. But don't want to "install" them. What are you to do? In other words; you want to create a "lib" type folder out of your web root to use (a|pre)pend to your @INC. This is easily accomplished, if you're calling it within your web root;
But not so easy, as you traverse deeper into the directory hierarchy, eg;
because now, Utils is 2 dir's back. So Perl complains, and your Util lib isn't used. What's a person to do? I've looked at useing blib. But that will possibly traverse (backwards) too far, into territory I don't want the web server/users to necessarily have access to. Further; it's intended for CLI use, with the -M. Given that I won't necessarily know how deep Perl might be, and when I do, I still don't want to have to prepend X amount of dots to the use lib. Is there, aside from actually installing it/them, a more elegant way to hande such situations? Or better, has anyone the knowledge of a Module that already does this sort of thing?
Thank you for all your time, and consideration.
--ChrisEDIT: I forgot to also mention, I also looked at FindBin.
ˇλɐp ʇɑəɹ⅁ ɐ əʌɐɥ puɐ ʻꜱdləɥ ꜱᴉɥʇ ədoH