in reply to trouble replacing dbmopen with tie

Im having a little trouble digesting the tie documentation and seeing why I should use tie rather than dbmopen.
A valid point. The dbmopen documentation ought to explain why it has been superceded by tie.

I don't claim to have a definitive answer. My hunch is that tie is much more flexible and Perl-ish function. So learning how to use it gives you a tool you can apply to many other types of situations.

But if dbmopen and its siblings are working for you, why change? I don't think a tie call is intended to be a drop-in replacement for a dbmopen call.

What do others think?

Jim Keenan

Replies are listed 'Best First'.
Re^2: trouble replacing dbmopen with tie
by PodMaster (Abbot) on Dec 29, 2005 at 02:35 UTC
    I don't claim to have a definitive answer. My hunch is that tie is much more flexible and Perl-ish function.
    That's a good hunch, which seems to be already documented. Note the argument list:
    'perldoc -f dbmopen'
    dbmopen HASH,DBNAME,MASK
    'perldoc -f tie'
    tie VARIABLE,CLASSNAME,LIST

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.