Re: How to set LD_LIBRARY_PATH

[email protected] (Paul Johnson)
Newsgroups perl.dbi.users,perl.beginners
Message-ID <[email protected]>
On Fri, May 28, 2010 at 11:23:32AM -0700, Marilyn Sander wrote:

> On May 28, 2010, at 9:33 AM, Paul Johnson wrote:
> 
> > On Fri, May 28, 2010 at 06:14:38AM -0400, John Scoles wrote:
> > 
> >> You will have to set those values before your modules load.
> >> 
> >> So you should stick them in the BEGIN and that should work
> > 
> > ... except where it doesn't, such as on Solaris for example.  Here,
> > LD_LIBRARY_PATH (at least) really does need to be set before the process
> > starts.  You can do this by writing a shell wrapper, or re-execing your
> > perl script if the value is not already set.

> Have you considered doing a require instead of a use.  With require, the
> loading is done at run time, and would be governed by the setting of
> LD_LIBRARY_PATH, at the time the require statement is executed.  Just set
> LD_LIBRARY_PATH before doing the require.

I'm afraid that you may have misunderstood what I wrote.  There are
times when you really do need to set the variable before the process
starts.

-- 
Paul Johnson - [email protected]
http://www.pjcj.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.