Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

dbmopen vs tie

by perigeeV (Hermit)
on May 27, 2001 at 20:21 UTC ( [id://83618]=perlquestion: print w/replies, xml ) Need Help??

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

Quoth The Camel(p.696, 3rd ed.):

The dbmopen function is really just a call to tie with the proper arguments, but is provided for backward compatibility with ancient versions of Perl.

I use dbmopen/close frequently for simple stuff. It picks the dbm library for you, quick and easy, etc. But when they use the word ancient I get an uncomfortable "deprecated in Perl 6" feeling. Y'all think I'm safe, or is using tie safer.

Thanks,
JeffK

Replies are listed 'Best First'.
Re: dbmopen vs tie
by chromatic (Archbishop) on May 27, 2001 at 22:26 UTC
    If you're writing new code, migrate to tie. The documentation for modules like DB_File and MLBDM use tie.

    If you're maintaining old code, you're safe leaving dbmopen in there.

    For what it's worth, dbmopen is listed as deprecated in Perl 5.5.3, so it's probably going to be gone for good in Perl 6.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://83618]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-26 00:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found