chorg has asked for the wisdom of the Perl Monks concerning the following question:

I know that it's deprecated - but I did not write this code.

I am on a solaris box and there is some code using dbmopen, with no locking. I want to use tie instead. How can I find out which kind of dbm file I am working with?
_______________________________________________
"Intelligence is a tool used achieve goals, however goals are not always chosen wisely..."

Replies are listed 'Best First'.
Re: dbmopen question
by merlyn (Sage) on Mar 09, 2001 at 22:32 UTC
    After the dbmopen, you can call ref tied %YOUR_DBM to get the class of the hidden object.

    And contrary to some people's opinions, dbmopen is a fine function to give simple interface to persistent storage, and will continue to be supported throughout the lifetime of Perl5.

    -- Randal L. Schwartz, Perl hacker