[Phoenix-pm] DBD/DynaLoader question
Michael Friedman
friedman at highwire.stanford.edu
Tue Jul 26 16:10:00 PDT 2005
Help?
I've installed DBI and DBD::Sybase, made sure everything can compile,
and even tested it. So I know the modules are working. The only problem
is that the module requires a certain order of directories in the
LD_LIBRARY_PATH and I can't seem to set that automatically. (This is on
Solaris.)
I have the ENV setting code as follows. It works fine and sets the
environment for the script properly.
BEGIN
{
if ($ENV{LD_LIBRARY_PATH})
{
$ENV{LD_LIBRARY_PATH} = '/opt/sybase/lib:' . $ENV{LD_LIBRARY_PATH};
}
else
{
$ENV{LD_LIBRARY_PATH} = '/opt/sybase/lib';
}
$ENV{SYBASE} = '/opt/sybase';
}
What I don't have is the place to put it. I've put it in my script, in
my shared module, even in DBD::Sybase.pm itself! When I try to even
load DBD::Sybase, it always acts as if the LD_LIBRARY_PATH was not set
properly. It seems to be loading in the Sybase.so file before it runs
the BEGIN block in DBD::Sybase itself. I don't know anything about the
DynaLoader, so I'm not sure if it's safe to try inserting the code
there -- or even where "there" is.
Anyone have any experience with DynaLoader and any thoughts that might
help?
Thanks much!
-- Mike
---------------------------------------------------------------------
Michael Friedman HighWire Press, Stanford Southwest
Phone: 480-456-0880 Tempe, Arizona
FAX: 270-721-8034 <friedman at highwire.stanford.edu>
---------------------------------------------------------------------
More information about the Phoenix-pm
mailing list