I have a cgi that uses DBI. Occasionally the LD_LIBRARY_PATH env var is not set correctly and causes a auto-load error when it gets to the use DBI statement.
How can I set it in the cgi? Simply setting $ENV{LD_LIBRARY_PATH} does not work, even in a BEGIN block. The perlvar doc does say that %ENV changes affect child processes (not the parent implied?).
I saw one reference to a script that forks to a shell and execs itself, but that is not so useful when the shell itself has a problem. Also, this is a web process so there could be i/o problems.