Have you tried (would it be suitable to use) the
-I/lib/path option on the perl script's shebang line?
#!/usr/bin/perl -I/path/containing/my_modules
use My::Module; # should load /path/containing/my_modules/My/Module.
+pm
This has always worked for me...
UPDATE: Sorry, I see that I have misunderstood the question. Having checked the man page for "env", I would have expected the use of LD_LIBRARY_PATH=/some/path to work. Then again, I'm looking at a freebsd man page for this utility, and it looks like its behavior may differ according to your OS (in particular, "env"s behavior changed between freebsd 5.6 and 6.0, for example...) Maybe you need to use "/usr/bin/env -S ..." to get things to work as expected? (Maybe the "-S" option is peculiar to freebsd? I don't know.)
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.