in reply to RE: Re: DBI, DBD::Oracle and LD_LIBRARY_PATH
in thread DBI, DBD::Oracle and LD_LIBRARY_PATH
I ran into this problem recently on Linux. (I think it was triggered by an update of the Oracle InstantClient package; it used to run okay with caring about LD_LIBRARY_PATH. I'm not certain of that, though.)
I ended up using the solution above, but changing the first condition from
unless ($ENV{BEGIN_BLOCK}) {to
unless (($ENV{BEGIN_BLOCK}) or $^C) {so that my habitual "perl -c script.pl" reflexes would work. Without that change, the BEGIN block will re-execute the script in fully-operational mode, which is almost certainly not what you want.
(Of course, in versions of Perl that have it - certainly 5.6.0 onward, maybe later revisions of 5.005 - you should just use an INIT block instead. But that wasn't an option when the question was originally asked.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: DBI, DBD::Oracle and LD_LIBRARY_PATH
by Anonymous Monk on Feb 24, 2009 at 16:11 UTC | |
by Anonymous Monk on Nov 08, 2012 at 22:12 UTC |