in reply to dynamic use and missing .dll
Which DLL does it complain about? The .../auto/DBD/Oracle/Oracle.dll or some DLL that's part of the Oracle client libraries? If the first it would probably be best to do something like:
If it is some other DLL then you will have to do something similar, but through a different list of directories. I guess through split(';', $ENV{PATH}) or in $ENV{ORACLE_HOME} or something. (I do not have Oracle to see where does it put its stuff.) Basicaly it seems you will have to make sure the DLL exists before you try to load the module.my $found = 0; for my $dir (@INC) { if (-e "$dir/auto/DBD/Oracle/Oracle.dll") { $found = 1; last; } } if ($found) { ...
Update: castaway and flounder99 seem to have missed that smackdab uses eval "use DBD::Oracle" which IS something that executes at "runtime" (we all know there is not just one compile time and runtime, but anyway) and does set the $@ correctly. The problem appears to be elsewhere. It appears that DBD::Oracle loads a DLL that references some other DLLs. If those DLLs are not found Windows show a message box. And only after you click-off this messagebox, the loading of DBD::Oracle fails and issues an exception. The exception IS caught correctly then.
So I believe the only way to suppress the messagebox (short of modifying the code of the DLL that failed to load the other DLL) is to make sure all necessary DLLs may be found. Not a nice solution, but the only solution I see.
Jenda
Always code as if the guy who ends up maintaining your code
will be a violent psychopath who knows where you live.
-- Rick Osborne
Edit by castaway: Closed small tag in signature
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: dynamic use and missing .dll
by smackdab (Pilgrim) on Apr 18, 2003 at 05:47 UTC |