No such thing as a small change | |
PerlMonks |
Re^3: DBI, DBD::Oracle and LD_LIBRARY_PATHby Anonymous Monk |
on Nov 30, 2008 at 23:25 UTC ( [id://726948]=note: print w/replies, xml ) | Need Help?? |
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.)
In Section
Seekers of Perl Wisdom
|
|