I posted this question once before, a couple of days ago, but never
really got an answer...

I have numerous perl scripts, mostly cgi's, that open numerous
password database files implemented as persistent hashes in perl
code.  I recently upgraded from an earlier version of Red Hat Linux to 
version 9.  This included an upgrade from perl 5.6.x to perl 5.8.0.
The new behavior of dbmopen has broken a lot of stuff on my
server. :-(

Here is a snippet of perl code where such a failure is occurring:

    # open the username/password database or create it
    dbmopen(%passwd, $passwd_db, 0600)
      || die "cannot open $passwd_db: $!";

This used to work flawlessly, but now it fails, with the following
entry in /var/log/httpd/error_log:

[Mon Nov 24 21:46:45 2003] [error] [client 192.168.1.3] cannot open 
/home/rj/chat/login.db: File exists at /var/www/cgi-bin/rj_chat_login.cgi line 109., 
referer: http://www.elilabs.com/~rj/chat/rj_chat_login.html

It seems to me that the legacy behavior of dbmopen has been broken by
the new version of perl.  Since this will require finding and fixing
every line of code that used dbmopen in pre-existing perl scripts, I
just cannot imagine that the implementors of the new version of perl
did not provide some compatibily with the old behavior.  It is one
thing to depricate a construct and recommend against using it in new
code, and another thing altogether to just eliminate the construct,
thereby breaking countless pre-existing programs that used to work.

What is the workaround or fix for this?  I am going to be intensely
annoyed if I have to go edit large numbers of old perl scripts to
change the way my persistent hashes are opened, including the logic of 
creating the file if it does not already exist.  What do I need to do?

Thans to all the helpful people on this list!

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to