Environment variables problem

Environment variables problem

am 04.03.2008 14:59:58 von Marian Schubert

Hello,

I'm having problems with ENV variables in my mod_perl scripts. I set
them using PerlSetEnv:
PerlSetEnv ORACLE_HOME "/opt/oracle/product/10.2/client_1"

but my DBI->connect fails with error message about missing
ORACLE_HOME. But when I put this just before connect:

$Data::Dumper::Useqq = 1;
die Dumper($ENV{ORACLE_HOME});

I get $VAR1 = "/opt/oracle/product/10.2/client_1"; in error log file
which is correct but connect still fails.

I found strange solution. If i put this before connect:

$ENV{ORACLE_HOME} = "$ENV{ORACLE_HOME}";

everything works just fine. Any idea why it doesn't work without this line?

cu,
MS