sybperl-l Archive
Up Prev Next
From: Paul S R Chisholm <psrc at corp dot airmedia dot com>
Subject: Re: perl and LD_LIBRARY_PATH
Date: Dec 12 1997 10:31PM
Katherine Marsden wrote:
> $ENV{LD_LIBRARY_PATH} .= "/usr/local/system10/lib:$ENV{LD_LIBRARY_PATH};
>
> use Sybase::DBlib;
Not tested:
BEGIN {
$ENV{LD_LIBRARY_PATH} = "/usr/local/system10/lib:$ENV{LD_LIBRARY_PATH}";
}
use Sybase::DBlib;
... because "use" happens *before* the first executable statement, as
if it was a "require" inside a "BEGIN" block. Setting a variable inside
a "BEGIN" block that's *before* the "use" will work.
I think it's a Sybperl FAQ. --PSRC
|