On Thu, 01 Aug 2002 11:40:29 +0000 Aruneesh Salhotra <[EMAIL PROTECTED]> wrote:

> My name is Aruneesh, and i am trying to use the BerkeleyDB module in Perl by
> calling use BerkeleyDB;
> 
> I am getting an error "Cannot locate loadable object for BerkeleyDB in
> @INC". The BerkeleyDB.pm is in
> /cygdrive/c/cygwin/db-4.0.14/perl/BerkeleyDB.pm. I have updated the @INC to
> reflect that by push function.
> 
> 
> I was seeing documentation on the problem, which is not so well documented.
> I am working on a deadline, and would appreciate if you could help me
> out on this.

A couple of possibilities.  Have you installed the BerkeleyDB module? 
Check the REAME that came with it, but you usually have to

   perl Makefile.PL
   make
   make test
   make install

to actually use the module.  From the error message it appears that
something will have to be compiled into a binary shared library.

If that is not the problem and your code has something like this

   push @INC, '/cygdrive/c/cygwin/db-4.0.14/perl';
   use BerkeleyDB;

then you should realize that 'use' occurs during a separate pass from
normal statement execution.  Try

   use lib '/cygdrive/c/cygwin/db-4.0.14/perl';
   use BerkeleyDB;

instead.  Adding the directory to $PERL5LIB before running perl is another
possibility which avoids hardcoding directories into the Perl code.

-- 
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.

Reply via email to