NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
set %ENV before you load the libs (Score:1)
BEGIN {
$ENV{LD_LIBRARY_PATH} = 'path_to_lib' ;
}
use FooLib ;
uri
Reply to This
Re:set %ENV before you load the libs (Score:2)
Based on what I was seeing yesterday, that is not correct. Oracle.so does not load at compilation time. All I do is use DBI. If I understand correctly, DBD::Oracle is not loaded until I say DBI->connect("dbi:Oracle...").
But just in case I was misunderstanding, I tried what you are suggesting, two ways: by putting the setting of LD_LIBRARY_PATH in a BEGIN block, as you suggested, and also by throwing 'use DBI' into a string eval, just for good measure, to make certain that the load must occur after t
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers