Hello,

When I run a script from shell using DBI and I have
LIBPATH set to something other than when DBI was
compiled, I get a install_driver(oracle) error and the
script dies.

$dbh = DBI->connect(dbi:Oracle:etc.....)

unsetting LIBPATH always works. The problem is I want
to trap this error so the script doesn't die if
someone executes it with the wrong LIBPATH. The only
way I have found to do this is the expensive operation
of calling

my @drivers = DBI->installed_versions;

and then check to see if Oracle is there before I 
DBI->connect. 

I have tried all methods of RaiseError, PrintError and
eval around the DBI->connect, but all still die with
the install_driver(oracle) error. 

Additionally, since the linkers cache the LIBPATH
value before the script even executes (from what i
understand), i can't unsetLIBPATH in a BEGIN block
either. 

Does anyone have a suggestion as to how I can deal
with this other than using DBI->installed_versions ? 

Thanks in advance for any help!

Aaron



__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you�re looking for faster
http://search.yahoo.com

Reply via email to