That long list of dirs containing Oracle.pm files all seem to be within your Oracle installation and not within your Perl installation except for the ones:

005 /usr/perl5/site_perl/5.8.4/sun4-solaris-64int/DBD/Oracle.pm 006 /usr/local/lib/perl5/site_perl/5.8.5/sun4-solaris/DBD/Oracle­.pm

The above suggests to me you have multiple Perls installed. Is /usr/bin/perl a symbolic link perhaps? I think you have not installed DBD::Oracle into the Perl you are using. The script you previously quoted started #!/usr/bin/perl and you presumably ran it with ./myscript.pl but we don't know if you have another Perl on your PATH (one perhaps you were using with the CPAN shell). So, what does "which perl" return and what happens when you run:

/usr/bin/perl -le 'use DBD::Oracle; print $DBD::Oracle::VERSION'

Now repeat without a specific path e.g., just perl -le....

If it is not installed, download it and install it yourself. Although installing DBD::Oracle via the CPAN shell is possible you really need to set ORACLE_HOME or LD_LIBRARY_PATH (when using Instant Client) and set ORACLE_USERID, TWO_TASK etc to run the tests.

Also, I don't believe changing LD_LIBRARY_PATH in your Perl code will work. I believe it needs to be set before you run your script.

Lastly, don't just blindly copy module files around, it often won't work and nearly always won't work when there is some XS code and hence a shared object that goes with the module.


In reply to Re^3: Can't locate DBD/Oracle.pm by mje
in thread Can't locate DBD/Oracle.pm by bluethundr

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.