PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Paul S R Chisholm <psrc at corp dot airmedia dot com>
Subject: Re: perl and LD_LIBRARY_PATH
Date: Dec 12 1997 10:31PM

Katherine Marsden wrote:
> $ENV{LD_LIBRARY_PATH} .= "/usr/local/system10/lib:$ENV{LD_LIBRARY_PATH};
> 
> use Sybase::DBlib;

Not tested:

BEGIN {
    $ENV{LD_LIBRARY_PATH} = "/usr/local/system10/lib:$ENV{LD_LIBRARY_PATH}";
}

use Sybase::DBlib;

... because "use" happens *before* the first executable statement, as
if it was a "require" inside a "BEGIN" block. Setting a variable inside
a "BEGIN" block that's *before* the "use" will work.

I think it's a Sybperl FAQ.  --PSRC