perl-unicode

RE: DB_File module on perl-5.8.7

2006-01-24 06:48:38
DB_File is just an interface to the Berkeley DB C library. On Unix boxes
this library is usually called something like libdb.a or libdb.so. So the
first step is to determine if you have a copy of Berkeley DB on your system.
I don't know offhand whether Berkeley DB works with Z/OS.

Assuming Berkeley DB is available, then copying DB_File.pm by hand is not
enough to get DB_File to work - it needs to built. 

Paul

-----Original Message-----
From: mohammad yaseen [mailto:akyaseen(_at_)yahoo(_dot_)com]
Sent: 24 January 2006 07:11
To: perl5-porters(_at_)perl(_dot_)org; perl-unicode(_at_)perl(_dot_)org; 
perl-mvs(_at_)perl(_dot_)org
Subject: DB_File module on perl-5.8.7

Hi,

  I''m using perl-5.8.7 on Z/OS.
  The testcase i'm runing is



  # Use the DBM module.
  use DB_File;

  $database="dbtest.db";

  if ( ! ( tie %DBFILE, 'DB_File', $database, O_RDWR|O_CREAT, 0600,
$DB_HASH ) )
    {
     print "Could not open (\"tie\") message database file
\"$database\".\n";
     exit(1);
    }

  $DBFILE{'record1'}="One line of data";
  untie(%DBFILE);

  I'm getting this error

   Can't locate DB_File.pm in @INC (@INC contains: /u/isldev1/GM/perl-
5.8.7/lib /u/
  opensrc/perl/usr/local/lib/5.8.7/os390-thread-multi
/u/opensrc/perl/usr/local/li
  b/5.8.7 /u/opensrc/perl/usr/local/lib/site_perl/5.8.7/os390-thread-multi
/u/open
  src/perl/usr/local/lib/site_perl/5.8.7
/u/opensrc/perl/usr/local/lib/site_perl .
  ) at /u/opensrc/perl/dbtest.pl line 4.
  BEGIN failed--compilation aborted at /u/opensrc/perl/dbtest.pl line 4.



  So i searched for DB_File.pm and found it in ext/DB_File/DB_File.pm,
  i copied this file to lib and ran the the test again

  Can't locate auto/DB_File/autosplit.ix in @INC (@INC contains:
/u/isldev1/latest
  /perl-5.8.7/lib /u/opensrc/perl/usr/local/lib/5.8.7/os390-thread-multi
/u/opensr
  c/perl/usr/local/lib/5.8.7
/u/opensrc/perl/usr/local/lib/site_perl/5.8.7/os390-t
  hread-multi /u/opensrc/perl/usr/local/lib/site_perl/5.8.7
/u/opensrc/perl/usr/lo
  cal/lib/site_perl .) at /u/isldev1/latest/perl-5.8.7/lib/AutoLoader.pm
line 160.
   at /u/isldev1/latest/perl-5.8.7/lib/DB_File.pm line 184
  Can't load module DB_File, dynamic loading not available in this perl.
    (You may need to build a new perl executable which either supports
    dynamic loading or has the DB_File module statically linked into it.)
   at /u/opensrc/perl/dbtest.pl line 4
  Compilation failed in require at /u/opensrc/perl/dbtest.pl line 4.
  BEGIN failed--compilation aborted at /u/opensrc/perl/dbtest.pl line 4.

  The perl has been build statically on my machine.

  How to resolve this problem?

  Is there any prerequisites has to be satisfied for building DB_File
module like any library should be available on the machine.





---------------------------------
Yahoo! Photos
 Got holiday prints? See all the ways to get quality prints in your hands
ASAP.


        
        
                
___________________________________________________________ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail 
http://uk.messenger.yahoo.com

<Prev in Thread] Current Thread [Next in Thread>