Hmmm - that doesn't seem quite right. I suspect that you are confusing the SYBASE env. variable with LD_LIBRARY_PATH.

When working with these environment variables it's always important to remember when theyaare needed.

DBI does not load the DBD::Sybase code when you issue a "use DBI". So it follows that you only need to set the SYBASE env. variable before you call DBI->connect() - unless you have a "use DBD::Sybase" statement, in which case you do need to have $ENV{SYBASE} defined and set correctly (because DBD::Sybase runs some Client Library initialization code when it gets loaded and that code needs the SYBASE env. variable to be set correctly.)

The LD_LIBRARY_PATH variable, on the other hand, does need to get set before the script starts. You can't affect the shared library search directories for the current process (at least not on the platforms that I am aware of!)

Michael


In reply to Re: Re: Re: ENV Object? by mpeppler
in thread ENV Object? by Warped

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.