Greetings, Monks.

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;

use lib ('Utils');
But not so easy, as you traverse deeper into the directory hierarchy, eg;
/dir1/dir2/dir3
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.

--Chris

EDIT: I forgot to also mention, I also looked at FindBin.

¡λɐp ʇɑəɹ⅁ ɐ əʌɐɥ puɐ ʻꜱdləɥ ꜱᴉɥʇ ədoH


In reply to Is there a Module that acts something like blib does? by taint

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.