in reply to Class::DBI::Oracle environment variable issue

The root of the problem is that by the time your program begins execution, LD_LIBRARY_PATH has already been used. Changing it will only affect any child processes, not the program's process itself. Your options are to either do the "exec myself" trick herveus mentions above, or to wrap a second program (Perl, or shell as you're using now) around your main program.

Replies are listed 'Best First'.
Re^2: Class::DBI::Oracle environment variable issue
by mildside (Friar) on Nov 22, 2005 at 23:08 UTC
    Thanks VSarkiss. I had kind of realised that this was the problem, but had thought maybe there was a way to tell DynaLoader where to look for the library. I even checked the doco and found an array that DynaLoader uses for this purpose, but couldn't get it to do what I want. I suspect that even in this case it is, as you say, too late.

    In any case, herveus's solution works and I'm happy.