On 2014-02-19 11:14:30 -0800, Bill Ward wrote:
> Remember that "use" is a kind of BEGIN block. You have to set the ENV
> variables in a BEGIN block before the "use" line.

Also, on several Unix-like systems (including Solaris and Linux/x86_64),
changing LD_LIBRARY_PATH while a process is running has no effect. So
this:

> On Feb 19, 2014 9:23 AM, "Bruce Johnson" <john...@pharmacy.arizona.edu>
> wrote:

> > $ENV{"ORACLE_HOME"}="/usr/lib/oracle/11.2/client64";
> > $ENV{"ORACLE_SID"}="phmweb";
> > $ENV{"LD_LIBRARY_PATH"}="/usr/lib/oracle/11.2/client64/lib";
> >
> > use DBI;
> >
[...]
> > my $dbh = DBI->connect( "dbi:Oracle:host=$dbhost", $login, $dbpass,
> >                       { RaiseError => 1 } );

doesn't work even with a BEGIN {} block around the assignments to %ENV.

You have to set LD_LIBRARY_PATH in a wrapper script.

        hp

-- 
   _  | Peter J. Holzer           | I think we need two definitions:
|_|_) | WSR - Softwaredevelopment | 1) The problem the *users* want us to solve
| |   | und Projektunterstützung  | 2) The problem our solution addresses.
__/   | h...@wsr.ac.at             |    -- Phillip Hallam-Baker on spam

Attachment: signature.asc
Description: Digital signature

Reply via email to